-
Notifications
You must be signed in to change notification settings - Fork 9
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
HTTP:X-Forwarded-Proto for HTTPS Redirection #3
Comments
Have you tries this? module.exports = {
plugins: [
{
resolve: 'gatsby-plugin-htaccess',
options: {
https: false,
custom: `
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule .* https://%{HTTP:Host}%{REQUEST_URI} [L,R=permanent]
`,
},
},
],
} First disable the default https-handling (just to be sure, that there's no interference). |
Could we add an extra flag like
|
xbojch
added a commit
to xbojch/gatsby-plugin-htaccess
that referenced
this issue
Aug 13, 2019
- adds a rewrite condition to force HTTPS also when behind a load balancer AndreasFaust#3
Awesome ! Thanks @xbojch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using the default HTTPS redirection of this plugin, i'm facing a ERR_TOO_MANY_REDIRECTS error. This issue is referenced here.
Due to the apache services i'm using, i would need to force https with theses rules :
I don't succeed to write this custom rule. Can you help me ?
The text was updated successfully, but these errors were encountered: