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
option to set response headers, specially for CORS #43
Comments
This sounds awesome, would love a pull request. |
dtao
added a commit
to dtao/http-server
that referenced
this issue
Nov 12, 2013
Closed
indexzero
pushed a commit
that referenced
this issue
Dec 6, 2013
I'm trying this option, but doesn't seem to work for me: http://stackoverflow.com/questions/24083329/angularjs-cannot-send-post-request-with-appropiate-cors-headers. Am I doing something wrong? |
I seem to have the same problem as @jorgeas80. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm developing locally and need multiple servers running on different ports, so XHR doesn't work (different port is also blocked by same-origin policy).
I want to simply add
Access-Control-Allow-Origin: *
to the response header but other users might have different needs so I'm thinking on a new option to set the custom headers:http-server --header 'Access-Control-Allow-Origin: *; X-Foo: Bar; X-Lorem: Ipsum; ...'
and also and alias for
Access-Control-Allow-Origin: *
:If you agree I can implement this feature and ask for a pull request next week.
The text was updated successfully, but these errors were encountered: