We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Resources having a $ in the path do not work.
Example: App requirements:
With the sample app attached i get:
/foo
access-control-allow-methods: POST, OPTIONS
~/dev/sandbox/cors $ curl -H 'Origin: http://example.com' -X OPTIONS -i 'http://127.0.0.1:9292/foo' HTTP/1.1 200 OK access-control-allow-origin: * access-control-allow-methods: POST, OPTIONS access-control-expose-headers: access-control-max-age: 7200 content-type: text/html vary: Origin Content-Length: 17
/baz
access-control-allow-methods: GET, OPTIONS
/$bar
curl -H 'Origin: http://example.com' -X OPTIONS -i 'http://127.0.0.1:9292/$bar' HTTP/1.1 200 OK access-control-allow-origin: * access-control-allow-methods: GET, OPTIONS access-control-expose-headers: access-control-max-age: 7200 content-type: text/html vary: Origin Content-Length: 17
Sample app:
# run it with rackup ./config.ru require 'rack/cors' app = Rack::Builder.new do use Rack::Cors do allow do origins '*' resource '/foo', headers: :any, methods: [:post, :options] resource '/$bar', headers: :any, methods: [:post, :options] resource '*', headers: :any, methods: [:get, :options] end end run lambda { |env| [200, {'content-type' => 'text/html'}, ['response accepted']] } end run app
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Resources having a $ in the path do not work.
Example:
App requirements:
With the sample app attached i get:
/foo
is returningaccess-control-allow-methods: POST, OPTIONS
as expected/baz
is returningaccess-control-allow-methods: GET, OPTIONS
as expected ( wildcard ressource)/$bar
is returningaccess-control-allow-methods: GET, OPTIONS
but it should returnaccess-control-allow-methods: POST, OPTIONS
Sample app:
The text was updated successfully, but these errors were encountered: