You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when a CORS request is performed from the browser, and the browser performs a preflight (OPTIONS) request, that request returns the same status code that would return for the request with the regular request method.
That makes requests to invalid URLs return a non-successful status code on the preflight request, which in turn makes the browser not to perform the next request.
Current behavior
OPTIONS requests return non 2xx status codes in some circumstances.
Expected behavior
OPTIONS requests always return 2xx status codes, even if the next request is going to return an unsuccessful status code.
How to reproduce
Perform an OPTIONS request to a URL starting with /rest that would not match any URL if performed with any other request method.
The text was updated successfully, but these errors were encountered:
How Shlink is set-up
Summary
Currently, when a CORS request is performed from the browser, and the browser performs a preflight (
OPTIONS
) request, that request returns the same status code that would return for the request with the regular request method.That makes requests to invalid URLs return a non-successful status code on the preflight request, which in turn makes the browser not to perform the next request.
Current behavior
OPTIONS requests return non 2xx status codes in some circumstances.
Expected behavior
OPTIONS requests always return 2xx status codes, even if the next request is going to return an unsuccessful status code.
How to reproduce
Perform an OPTIONS request to a URL starting with
/rest
that would not match any URL if performed with any other request method.The text was updated successfully, but these errors were encountered: