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

[Feature Request] Environment Variables to adjust CORS header values #73

Closed
aleccool213 opened this issue Dec 16, 2019 · 5 comments
Closed

Comments

@aleccool213
Copy link
Contributor

Feature Request

I have read the docs concerning the CORS header values and how to configure them using a reverse proxy. For myself, my need for a reverse proxy is low, I am requesting the ability to add these headers to all requests when new environment variables are added and set.

For e.g.

res.addHeader("Access-Control-Allow-Origin", "https://myackeehostedinstance.herokuapp.com")
@electerious
Copy link
Owner

Hey @aleccool213, the reverse proxy is required for both HTTPS and CORS. My plan was to keep the server related logic away from Ackee as everyone has a different setup.

How are you adding HTTPS?

@aleccool213
Copy link
Contributor Author

aleccool213 commented Dec 16, 2019

My plan was to keep the server related logic away from Ackee as everyone has a different setup.

This is a smart separation of concerns and I generally agree with this.

Unfortunately for me, I am running Ackee on Heroku. It provides a free SSL certificate for free dynos.

Screenshot at Dec 16 08-45-06

Albeit, not a strict cert for my specific domain.

I could spend some time getting NGNIX set up on Heroku, from my initial research it looks like a lot of people have done this.

Ideally, to keep the amount of config low for newcomers, they wouldn't need to do this. Or we should at least reference to an example for others to use: https://github.com/narr/heroku-nginx-node-example

@aleccool213
Copy link
Contributor Author

Update on this, I tried getting https://github.com/narr/heroku-nginx-node-example up and running but it is super old. Need more time to debug why that wasn't working, or try it from scratch myself.

@electerious
Copy link
Owner

Will be part of v1.4.3.

@electerious electerious mentioned this issue Jan 12, 2020
@electerious
Copy link
Owner

Should ACKEE_ALLOW_ORIGIN be part of the app.json so it can be configured by the user?

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

Successfully merging a pull request may close this issue.

2 participants