News for hackers. Stuff that matters.
Re:API Shouldn't Redirect HTTP to HTTPS by NotYourLawyer on Tuesday May 28, 2024 @09:08PM (#40507219)
How would the endpoint prevent that?
Re:API Shouldn't Redirect HTTP to HTTPS by TheDong on Tuesday May 28, 2024 @10:32PM (#40507808)
Not listening on port 80, such that the user gets a connection refused, would result in the client not sending the api key over the wire at all.

I personally think listening, accepting that user mistakes can expose API keys to MITMs, and returning the user-facing error is better than a "connection refused" error, but it is a tradeoff.