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

Forcing HTTPS responses? Attempts to fix ATS errors #169

Closed
raphaelschaad opened this issue Feb 13, 2020 · 3 comments
Closed

Forcing HTTPS responses? Attempts to fix ATS errors #169

raphaelschaad opened this issue Feb 13, 2020 · 3 comments

Comments

@raphaelschaad
Copy link

Is forcing HTTPS responses a good idea? https://medium.com/@connorlurring/fixing-nuts-auto-updates-for-our-electron-app-64beeed8b14 /by @connorlurring

The author attempts to fix Apple Transport Security (ATS) errors when the an Electron client requests the update through HTTPS but then the nuts deployment setup (Heroku in this case) returns an HTTP URL. /cc @SamyPesse @AaronO

@ogtfaber
Copy link

ogtfaber commented May 3, 2020

You can solve this by setting TRUST_PROXY to true in Heroku

See #163 (comment)

@connorlurring
Copy link

connorlurring commented May 3, 2020

Hi @raphaelschaad thanks for taking the time to critically evaluate my article!

While forcing HTTPS isn't the optimal solution, it has worked for my use case since that article was written, with no unforeseen issues.

That said, thanks @ogtfaber for bringing #163 to my attention. TRUST_PROXY sounds like a valid solution, I plan to amend the article shortly to recommend it. I wasn't aware that there was a commonplace solution for trusting the proxy in a situation like this, and the original solution was based on the Heroku documentation not having any reference to this config var.

It seems that TRUST_PROXY is a commonly used configuration for a variety of products, and should be more generally suitable as advice, leaving the original functionality of the library unchanged.

@raphaelschaad
Copy link
Author

Thanks @ogtfaber for the solution, I have since adopted it. And thanks @connorlurring for updating your post for everyone else, given you're the top result I found googling the problem. You can point to the relevant bits of Nuts' docs. Closing this issue.

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

No branches or pull requests

3 participants