News for hackers. Stuff that matters.
Re:API Shouldn't Redirect HTTP to HTTPS by mbreese on Tuesday May 28, 2024 @11:08PM (#40508032)
But that also implies that some user would be authorized to make a request to the HTTP port (or that the resource does exist, which in this case it doesn’t).

IMO, 400 is more accurate, but really either could be acceptable, so long as the client is notified of the error. But, I wouldn’t automatically redirect the client. That’s what we are trying to avoid.

Re:API Shouldn't Redirect HTTP to HTTPS by ants_everywhere on Wednesday May 29, 2024 @10:43AM (#40512504)
Good point.

I guess this might depend a little on the implementation. In some cases the http endpoint may exist but may only be accessible to a sidecar container via localhost. For example, if the sidecar terminates https.