etherpad: fix robots.txt
Fix the path to robots.txt and ensure it exists with testinfra Change-Id: Iacf9db38ee61cb8f17f261b422c0f2ac1d0b5e45
This commit is contained in:
parent
1288de67aa
commit
90106e917a
@ -57,9 +57,9 @@
|
|||||||
RewriteCond %{HTTP_HOST} !{{ etherpad_vhost_name }}
|
RewriteCond %{HTTP_HOST} !{{ etherpad_vhost_name }}
|
||||||
RewriteRule ^.*$ https://{{ etherpad_vhost_name }} [L,R=301]
|
RewriteRule ^.*$ https://{{ etherpad_vhost_name }} [L,R=301]
|
||||||
|
|
||||||
# Server robots.txt directly so that it does not affect
|
# Serve robots.txt directly so that it does not affect
|
||||||
# etherpad-lite installation.
|
# etherpad-lite installation.
|
||||||
RewriteRule ^/robots.txt$ /var/etherpad/robots.txt [L]
|
RewriteRule ^/robots.txt$ /var/etherpad/www/robots.txt [L]
|
||||||
|
|
||||||
# Refuse external connections to the API through the proxy
|
# Refuse external connections to the API through the proxy
|
||||||
RewriteRule ^/api/ - [F,L]
|
RewriteRule ^/api/ - [F,L]
|
||||||
|
@ -18,4 +18,10 @@ testinfra_hosts = ['etherpad01.opendev.org']
|
|||||||
|
|
||||||
def test_etherpad_listening(host):
|
def test_etherpad_listening(host):
|
||||||
etherpad = host.socket("tcp://127.0.0.1:9001")
|
etherpad = host.socket("tcp://127.0.0.1:9001")
|
||||||
assert etherpad.is_listening
|
assert etherpad.is_listening
|
||||||
|
|
||||||
|
def test_etherpad_robots(host):
|
||||||
|
cmd = host.run('curl --insecure '
|
||||||
|
'--resolve etherpad.opendev.org:443:127.0.0.1 '
|
||||||
|
'https://etherpad.opendev.org/robots.txt')
|
||||||
|
assert 'Disallow: /' in cmd.stdout
|
||||||
|
Loading…
x
Reference in New Issue
Block a user