-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP_UPGRADE_INSECURE_REQUESTS should be optional #174
Comments
I've just run into this issue as well, and agree. I know it's trying to help (and, frankly, sticking to the standards which say HTTPS must be used), but it makes development in a local environment without HTTPS - like the PHP built-in server - more difficult than it need be. I see two workarounds right now:
Both of these seem a bit wrong, but I think both would work. The first one in particular should definitely only be done if it's a development environment, so would really only be safe if your code is able to make that distinction at runtime. |
add get/setHttpUpgradeInsecureRequests(), fixes jumbojett#174
I forked this library and added a new method |
I think the correct fix is to revert the commit that added this feature in the first place. (c3ba743) The header should be handled by the server that accepts the HTTP request, and it should respond with an appropriate Location header if a secure channel is available, and configured to honor the header. The Upgrade-Insecure-Requests HTTP header is not about upgrading insecure links inside an application. |
add get/setHttpUpgradeInsecureRequests(), fixes #174
I am running into an issue with a test environment where the protocol is upgraded to https when I don't want it to be.
http://localhost/app
.Upgrade-Insecure-Requests: 1
header.http://localhost:9100/authorize
.http://localhost:9100/authorize?response_type=code&redirect_uri=https%3A%2F%2Flocalhost%2Fapp%2Findex.php
.Invalid redirect: https://localhost/app/index.php does not match one of the registered values: [http://localhost:4500/ws/test_oidc/home2, http://localhost/app/index.php, http://localhost:4500/ws/test_oidc/home]
Should this step be made optional?
The text was updated successfully, but these errors were encountered: