Skip to content

Conversation

simonihmig
Copy link

If FORCE_HTTPS is set, will make a redirect if not using https at the Load Balancer. Parts of it shamelessly stolen from ember-fastboot/fastboot-app-server#36.

@tomdale ping!

@ghost
Copy link

ghost commented Mar 9, 2017

I've been using this for a while and occasionally getting:

TypeError: Cannot read property 'indexOf' of undefined
    at forceHttpsMiddleware (/var/app/current/lib/force-https.js:5:80)

in the logs.

@simonihmig
Copy link
Author

@ERKarl thanks, indeed if the user agent header is undefined this would cause this exception. I just pushed a little change that should hopefully fix this!

@ghost
Copy link

ghost commented Mar 9, 2017

@simonihmig thanks - going to test it :)

@ghost
Copy link

ghost commented Apr 1, 2017

@simonihmig working just great so far :)

@simonihmig
Copy link
Author

@ERKarl thanks, good to know!

@tomdale when you have recovered from EmberConf, would you consider merging this? 😉

@simonihmig simonihmig closed this May 9, 2017
@simonihmig simonihmig deleted the https-redirect branch May 9, 2017 16:18
@simonihmig simonihmig restored the https-redirect branch May 9, 2017 16:20
@simonihmig simonihmig reopened this May 9, 2017
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.

1 participant