Skip to content
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

Allow Cross-Origin requests for frontend agents #255

Closed
hmdhk opened this issue Oct 26, 2017 · 1 comment
Closed

Allow Cross-Origin requests for frontend agents #255

hmdhk opened this issue Oct 26, 2017 · 1 comment

Comments

@hmdhk
Copy link
Contributor

hmdhk commented Oct 26, 2017

apm-server should respond to OPTIONS and POST requests with correct access control headers:

Response to OPTIONS should include these
Access-Control-Allow-Origin "*";
Access-Control-Allow-Headers "Content-Type";
Access-Control-Allow-Methods "POST";

Note: We have to update Access-Control-Allow-Headers if we choose to use custom headers on the agent side but for now the above should be enough.

And the response to the original POST request should include:
Access-Control-Allow-Origin "*";

In production mode Access-Control-Allow-Origin should be configured by the user to something other than "*"

Docs:
https://fetch.spec.whatwg.org/
https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS

@roncohen
Copy link
Contributor

roncohen commented Nov 6, 2017

Closed by #244

@roncohen roncohen closed this as completed Nov 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants