use filter to split out hostename and schema from listening address

This commit is contained in:
Robert Kaussow 2018-12-09 00:40:06 +01:00
parent 25aede7aeb
commit 99dae4de83
2 changed files with 3 additions and 4 deletions

View File

@ -24,8 +24,7 @@ gitea_data_dir: "{{ gitea_base_dir }}/data"
gitea_bind_ip: 127.0.0.1
gitea_bind_port: 61000
gitea_listen_address: gitea.example.com
gitea_listen_protocol: "{{ gitea_bind_protocol }}"
gitea_listen_address: http://gitea.example.com
gitea_install_lock: true
gitea_secret: "1234567ABCDEFG"

View File

@ -66,8 +66,8 @@ FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd
[server]
PROTOCOL = {{ 'https' if gitea_tls_enabled else 'http' }}
DOMAIN = {{ gitea_listen_address }}
ROOT_URL = {{ gitea_listen_protocol }}://%(DOMAIN)s/
DOMAIN = {{ gitea_listen_address | urlsplit('hostname') }}
ROOT_URL = {{ gitea_listen_address | urlsplit('scheme') }}://%(DOMAIN)s/
HTTP_ADDR = {{ gitea_bind_ip }}
HTTP_PORT = {{ gitea_bind_port }}
UNIX_SOCKET_PERMISSION = 666