-
Notifications
You must be signed in to change notification settings - Fork 262
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
add note on origins w/ default port to README.md #163
base: master
Are you sure you want to change the base?
Conversation
When `http://EXAMPLE:80` is an allowed origin, requests are not allowed from `http://EXAMPLE`. Since port 80 is the default port for HTTP, browsers will strip it and thus rack-cors never receives a request from `http://EXAMPLE`. A similar problem is discussed here: request/request#515
@cyu Is this still being considered? If not, I can close the PR. |
@nbr I'm hesitant because of potential unintended side effects of using |
@cyu That makes sense, since it is not an obvious requirement of Latest commit does not rely on |
@cyu Any feedback on the latest commit? |
@nbr I left a comment after the last change (about parse errors in Also, having thought about this more, I’m thinking we should do this on initialization or at least on first eval — we shouldn’t penalize every call with this evaluation. Thoughts? |
@cyu The root cause of the issue in requests was fixed (request/request#2904), so I suspect less Ruby apps will run into this. I pivoted this PR to just add a note to the README.md. |
When
http://EXAMPLE:80
is an allowed origin, requests are not allowed fromhttp://EXAMPLE
. Since port 80 is the default port for HTTP, browserswill strip it and thus rack-cors never receives a request from
http://EXAMPLE
.A similar problem is discussed here: request/request#515