Skip to content
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

Merged
merged 3 commits into from
Nov 25, 2017
Merged

Allow configuring allowed CORS origins for suggest #1282

merged 3 commits into from
Nov 25, 2017

Conversation

paulmelnikow
Copy link
Member

  • Support single-server testing and a local dev server (Rewrite frontend in React #1273) that is on a different port from the shields server
  • Refactor config schema

With this change, the suggestions work locally in #1273.

- Support single-server testing and a local dev server (like Next) that is on a different port from the shields server
- Refactor config schema
@paulmelnikow paulmelnikow added the frontend The React app and the infrastructure that supports it label Nov 21, 2017
@paulmelnikow
Copy link
Member Author

Companion PR: badges/ServerScript#2

@platan
Copy link
Member

platan commented Nov 22, 2017

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`:
Copy link
Member

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.

Copy link
Member Author

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.

@paulmelnikow
Copy link
Member Author

Thanks for the careful read + review!

@paulmelnikow paulmelnikow merged commit 1af1f49 into badges:master Nov 25, 2017
@paulmelnikow paulmelnikow deleted the cors branch November 25, 2017 23:27
espadrine pushed a commit to badges/ServerScript that referenced this pull request Dec 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend The React app and the infrastructure that supports it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants