htmx icon indicating copy to clipboard operation
htmx copied to clipboard

HTMX redirect to difference protocol

Open zixsma opened this issue 1 year ago • 1 comments

I am attempting to redirect the user to http://localhost:8888/login with a status code of 302 from the request http://localhost:8888/app/650ac897c70568965390695f/crm/appointments. Screenshot from 2023-12-29 12-06-27

However, HTMX is making a call to https://localhost:8888/login instead. Screenshot from 2023-12-29 12-07-59

I cannot find any documentation about this. Is this the intended behavior?

zixsma avatar Dec 29 '23 05:12 zixsma

Not sure whether this is the problem, but I noticed that you're responding with a Strict-Transport-Security header for an HTTP (not HTTPS) request. This tells the browser that it must always use HTTPS for this site.

svenberkvens avatar Dec 29 '23 20:12 svenberkvens

@svenberkvens Oh thank you. I will close this issue.

zixsma avatar Dec 30 '23 08:12 zixsma