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

For Apache, prefer 308 Permanent Redirect to 301 Moved Permanently #137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/js/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export default async function () {
opensslCiphers: ciphers,
opensslCipherSuites: ssc.ciphersuites,
origin: url.origin,
permanentRedirect: ssc.permanent_redirect || 301,
protocols: protocols,
serverPreferredOrder: ssc.server_preferred_order,
showSupports: configs[server].showSupports !== false,
Expand Down
3 changes: 3 additions & 0 deletions src/static/guidelines/5.6.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"maximum_certificate_lifespan": 90,
"ocsp_staple": true,
"oldest_clients": ["Firefox 63", "Android 10.0", "Chrome 70", "Edge 75", "Java 11", "OpenSSL 1.1.1", "Opera 57", "Safari 12.1"],
"permanent_redirect": 308,
"recommended_certificate_lifespan": 90,
"rsa_key_size": null,
"server_preferred_order": false,
Expand Down Expand Up @@ -82,6 +83,7 @@
"maximum_certificate_lifespan": 366,
"ocsp_staple": true,
"oldest_clients": ["Firefox 27", "Android 4.4.2", "Chrome 31", "Edge", "IE 11 on Windows 7", "Java 8u31", "OpenSSL 1.0.1", "Opera 20", "Safari 9"],
"permanent_redirect": 301,
"recommended_certificate_lifespan": 90,
"rsa_key_size": 2048,
"server_preferred_order": false,
Expand Down Expand Up @@ -197,6 +199,7 @@
"maximum_certificate_lifespan": 366,
"ocsp_staple": true,
"oldest_clients": ["Firefox 1", "Android 2.3", "Chrome 1", "Edge 12", "IE8 on Windows XP", "Java 6", "OpenSSL 0.9.8", "Opera 5", "Safari 1"],
"permanent_redirect": 301,
"recommended_certificate_lifespan": 90,
"rsa_key_size": 2048,
"server_preferred_order": true,
Expand Down
2 changes: 1 addition & 1 deletion src/templates/partials/apache.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<VirtualHost *:80>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/\.well\-known/acme\-challenge/
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R={{#if (minver '2.4.3' form.serverVersion)}}{{output.permanentRedirect}}{{else}}301{{/if}},L]
</VirtualHost>

{{/if}}
Expand Down