-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Footer: remove jsonp call #7756
Conversation
Use normal json instead, we don't have problems with CORS anymore and this allow us to cache the footer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will work as long as the proxied_api_host
is the same as the host. Otherwise it won't work. Also, you can remove crossDomain: true,
I believe.
We should probably just change the function name on the jsonp call to be consistent tho, and that will solve this issue with fewer changes. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a better approach, and protects use cases that aren't doing proxied API. I wonder if the analytics endpoint should use jsonp for consistency?
The way I see it, jsonp is just a hack around CORS, I think new endpoints should use CORS rules to fix that. |
Use normal json instead,
we don't have problems with CORS anymore and this allow us to cache the
footer.