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

Add a way to test Access-Control-Allow-Origin: * #19

Open
doppelganger9 opened this issue Oct 11, 2018 · 3 comments · May be fixed by #20
Open

Add a way to test Access-Control-Allow-Origin: * #19

doppelganger9 opened this issue Oct 11, 2018 · 3 comments · May be fixed by #20

Comments

@doppelganger9
Copy link

Using a wildcard ("*") in Access-Control-Allow-Origin Header bears special meaning within the CORS specification.

It would be interesting to be able to play with this option, notably to check the behaviour of different browsers.

For example,
adding an "Allow Origin" field in the "Local" Server part,
with an option to "mirror" the requesting origin,
or to specify a text field where we can put a specific value, including the wildcard "*".

@doppelganger9
Copy link
Author

Related server code:

self.response.headers['Access-Control-Allow-Origin'] = self.request.headers['origin']

@doppelganger9
Copy link
Author

Thanks for your pointers!

I knew about the article and different browser extensions.

My point opening an issue was to provide a way via test-cors.org to test another CORS option/configuration to see how browser react to it.

So using an extension is not the aim, it is overriding the browser's CORS implementation.

test-cors.org only works with ACAO that reflects the received Origin;
I want to be able to provide other server-side values (f.ex.):

  • ACAO: origin1 origin2 (to test browser not allowing multiple values like it is specified in the spec)
  • ACAO: null
  • ACAO: *
  • ACAO: {=origin mirroring} ( = current implementation)

I hope this clarifies the feature request.

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

Successfully merging a pull request may close this issue.

2 participants