Merge "etherpad: fix robots.txt"
This commit is contained in:
commit
d1ac0aee2d
@ -57,9 +57,9 @@
|
||||
RewriteCond %{HTTP_HOST} !{{ etherpad_vhost_name }}
|
||||
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.
|
||||
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
|
||||
RewriteRule ^/api/ - [F,L]
|
||||
|
@ -18,4 +18,10 @@ testinfra_hosts = ['etherpad01.opendev.org']
|
||||
|
||||
def test_etherpad_listening(host):
|
||||
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…
Reference in New Issue
Block a user