107
Your API Shouldn't Redirect HTTP to HTTPS
(jviide.iki.fi)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
Hindsight is 20/20. As seen in the post, there's not that many APIs that don't just blindly redirect HTTP to HTTPS since it's sort of the default web server behaviour nowadays.
Probably a non-issue in most cases since the URLs are usually set by developers but of course mistakes happen and it absolutely makes sense to not redirect HTTP for APIs and even invalidate any token used over HTTP.
Invalidating creds sent over http is a great point!