-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Allow configuring allowed CORS origins for suggest #1282
Conversation
- Support single-server testing and a local dev server (like Next) that is on a different port from the shields server - Refactor config schema
Companion PR: badges/ServerScript#2 |
Code looks good for me. I'm going to run it and test it tomorrow. |
``` | ||
|
||
If you want to use server suggestions, you should also set `ALLOWED_ORIGIN`: |
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.
In line 20 in this file, there is an info that one should build frontend using BASE_URL=https://your-server.example.com npm run build:production
build:production
runs make footer-production-transform
, which sets img.shields.io
as a suggestions server (var origin = 'https://img.shields.io';
in index.html
). Requests from locally build frontend will go to img.shields.io.
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.
Thanks for noticing that. It should be fixed as part of #1273, which gets rid of the makefile transform and ships the suggestions server through the bundle.
Thanks for the careful read + review! |
With this change, the suggestions work locally in #1273.