-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
ring-cors breaks 404 routes when origin header is specified #10
Comments
Issue #5 should be covered by this I think: |
I think you have a problem with your test. You're missing: Test should probably be: (deftest test-no-cors-header-when-handler-returns-nil
(is (nil? ((wrap-cors (fn [_] nil)
:access-control-allow-origin #".*example.com"
:access-control-allow-methods [:get])
{:request-method
:get :uri "/"
:headers {"origin" "http://example.com"}})))) |
@chenfisher I just pushed |
I'm not sure this is directly related to that issue but I have the following error
when I add an origin header to a curl request.
|
Hi,
When a request contains the 'origin' header - ring-cores sets a response map even if the original response was nil (when route not found) thus making the server return 200 status code instead of 404.
I believe it's the same issue as #5 , which I see was not merged in and is now obsolete to due code change.
Thanks
The text was updated successfully, but these errors were encountered: