Skip to content

Exposes API endpoint URL to client via env variable #323

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

Merged
merged 1 commit into from
Mar 16, 2017

Conversation

andrewn
Copy link
Member

@andrewn andrewn commented Mar 12, 2017

Sets the API URL globally via a variable in .env that is used by the client to make API requests.

This means we can change the API_URL in a single place and still have something different in development and production if needed.

It should also mean that we can set API_URL to be https so that clients always communicate securely. However, when I tried to test this I got a CORS error so I think there'll be another PR to sort that out. Until then, setting the API_URL=/api gives us the same behaviour as we have now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants