-
Notifications
You must be signed in to change notification settings - Fork 8
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
JSONP requests to service/reasonBreakdown.json fails #19
Comments
Removing |
Collections-test is not showing usage stats when pointing to logger-test. I can see the request for a JSONP callback is not being wrapped in the JS method, as expected - its returning normal JSON. Need to check if the JSONP is being done at app or Nginx level. EDIT: app previously used the |
@Rita-C I think can be done easily with a Grails interceptor. Here's an example with an old-style Filter: |
Enabled CORS in |
Code all good. |
Some endpoints on logger like
service/reasonBreakdown.json
return with response headerContent-Type
set toapplication/json
. This happens even for JSONP requests. Browsers are smart to change to the correctContent-Type
,application/javascript
. However, for security reasons, server can disable auto content-type conversion by settingX-Content-Type-Options
header tonosniff
. Such requests are rejected by browser. At present, collectory makes the JSONP request to show statistics. This could fail and show no stats. There are a few ways to fix this issue -X-Content-Type-Options
header.The text was updated successfully, but these errors were encountered: