mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-16 00:47:29 +02:00
Adapted webserver test for web-app-yourls
This commit is contained in:
parent
6272303b55
commit
3eb51a32ce
@ -20,7 +20,7 @@ def get_expected_statuses(domain: str, parts: list[str], redirected_domains: set
|
|||||||
if (parts and parts[0] == 'www') or (domain in redirected_domains):
|
if (parts and parts[0] == 'www') or (domain in redirected_domains):
|
||||||
return [301]
|
return [301]
|
||||||
if domain == '{{domains | get_domain('web-app-yourls')}}':
|
if domain == '{{domains | get_domain('web-app-yourls')}}':
|
||||||
return [403]
|
return [{{ applications | get_app_conf(application_id, 'server.status_code.landingpage', True) }}]
|
||||||
return [200, 302, 301]
|
return [200, 302, 301]
|
||||||
|
|
||||||
# file in which fqdn server configs are deposit
|
# file in which fqdn server configs are deposit
|
||||||
|
@ -29,6 +29,8 @@ server:
|
|||||||
unsafe-inline: true
|
unsafe-inline: true
|
||||||
locations:
|
locations:
|
||||||
admin: "/admin/"
|
admin: "/admin/"
|
||||||
|
status_code:
|
||||||
|
landingpage: 301
|
||||||
docker:
|
docker:
|
||||||
services:
|
services:
|
||||||
database:
|
database:
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
location = / {
|
location = / {
|
||||||
return 301 {{ yourls_admin_location }};
|
return {{ yourls_landingpage_status_code }} {{ yourls_admin_location }};
|
||||||
}
|
}
|
@ -9,6 +9,7 @@ yourls_version: "{{ applications | get_app_conf(application_id, 'doc
|
|||||||
yourls_image: "{{ applications | get_app_conf(application_id, 'docker.services.yourls.image', True) }}"
|
yourls_image: "{{ applications | get_app_conf(application_id, 'docker.services.yourls.image', True) }}"
|
||||||
yourls_container: "{{ applications | get_app_conf(application_id, 'docker.services.yourls.name', True) }}"
|
yourls_container: "{{ applications | get_app_conf(application_id, 'docker.services.yourls.name', True) }}"
|
||||||
yourls_admin_location: "{{ applications | get_app_conf(application_id, 'server.locations.admin', True) }}"
|
yourls_admin_location: "{{ applications | get_app_conf(application_id, 'server.locations.admin', True) }}"
|
||||||
|
yourls_landingpage_status_code: "{{ applications | get_app_conf(application_id, 'server.status_code.landingpage', True) }}"
|
||||||
|
|
||||||
# Nginx Specific
|
# Nginx Specific
|
||||||
proxy_extra_configuration: "{{ lookup('template', 'redirect.conf.j2') }}"
|
proxy_extra_configuration: "{{ lookup('template', 'redirect.conf.j2') }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user