mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 23:32:06 -04:00
s/301/308
This commit is contained in:
parent
6d527bcc42
commit
d93762239c
3 changed files with 6 additions and 6 deletions
|
|
@ -1150,7 +1150,7 @@ def _redirect_block_for_domain(domain):
|
|||
updated_domain = '^' + updated_domain + '$'
|
||||
redirect_block = [[
|
||||
['\n ', 'if', ' ', '($host', ' ', match_symbol, ' ', '%s)' % updated_domain, ' '],
|
||||
[['\n ', 'return', ' ', '301', ' ', 'https://$host$request_uri'],
|
||||
[['\n ', 'return', ' ', '308', ' ', 'https://$host$request_uri'],
|
||||
'\n ']],
|
||||
['\n']]
|
||||
return redirect_block
|
||||
|
|
|
|||
|
|
@ -557,7 +557,7 @@ class NginxConfiguratorTest(util.NginxTest):
|
|||
[], []]],
|
||||
[['server'], [
|
||||
[['if', '($host', '=', 'www.example.com)'], [
|
||||
['return', '301', 'https://$host$request_uri']]],
|
||||
['return', '308', 'https://$host$request_uri']]],
|
||||
['#', ' managed by Certbot'], [],
|
||||
['listen', '69.50.225.155:9000'],
|
||||
['listen', '127.0.0.1'],
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ class VirtualHostTest(unittest.TestCase):
|
|||
raw1 = [
|
||||
['listen', '69.50.225.155:9000'],
|
||||
[['if', '($scheme', '!=', '"https") '],
|
||||
[['return', '301', 'https://$host$request_uri']]
|
||||
[['return', '308', 'https://$host$request_uri']]
|
||||
],
|
||||
['#', ' managed by Certbot']
|
||||
]
|
||||
|
|
@ -125,7 +125,7 @@ class VirtualHostTest(unittest.TestCase):
|
|||
raw2 = [
|
||||
['listen', '69.50.225.155:9000'],
|
||||
[['if', '($scheme', '!=', '"https") '],
|
||||
[['return', '301', 'https://$host$request_uri']]
|
||||
[['return', '308', 'https://$host$request_uri']]
|
||||
]
|
||||
]
|
||||
self.vhost2 = VirtualHost(
|
||||
|
|
@ -187,7 +187,7 @@ class VirtualHostTest(unittest.TestCase):
|
|||
from certbot_nginx._internal.obj import Addr
|
||||
from certbot_nginx._internal.configurator import _test_block_from_block
|
||||
test_block = [
|
||||
['\n ', 'return', ' ', '301', ' ', 'https://$host$request_uri'],
|
||||
['\n ', 'return', ' ', '308', ' ', 'https://$host$request_uri'],
|
||||
['\n']
|
||||
]
|
||||
test_needle = _test_block_from_block(test_block)
|
||||
|
|
@ -199,7 +199,7 @@ class VirtualHostTest(unittest.TestCase):
|
|||
['#', ' managed by Certbot'],
|
||||
['ssl_certificate_key', '/etc/letsencrypt/live/two.functorkitten.xyz/privkey.pem'],
|
||||
['#', ' managed by Certbot'],
|
||||
['return', '301', 'https://$host$request_uri'],
|
||||
['return', '308', 'https://$host$request_uri'],
|
||||
['#', ' managed by Certbot'], []]
|
||||
vhost_haystack = VirtualHost(
|
||||
"filp",
|
||||
|
|
|
|||
Loading…
Reference in a new issue