Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
nextcloud: add tristed_proxies, template it
Browse files Browse the repository at this point in the history
Also template `trusted_domains` for consistency.

Signed-off-by: Jakub Sokołowski <[email protected]>
  • Loading branch information
jakubgs committed Mar 24, 2022
1 parent 6090911 commit 7252003
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 8 additions & 0 deletions ansible/roles/nextcloud/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ nextcloud_compose_file: '{{ nextcloud_service_path }}/docker-compose.yml'

# Proxy
#nextcloud_domain: ~
nextcloud_trusted_domains:
- 'localhost'
- '{{ nextcloud_domain }}'
- '{{ nextcloud_docs_domain }}'
nextcloud_trusted_proxies:
- '127.0.0.1' # localhost
- '10.0.0.0/8' # VPN
- '172.17.0.0/16' # Docker
# Admin
nextcloud_admin_email: '[email protected]'
nextcloud_admin_username: 'admin'
Expand Down
5 changes: 2 additions & 3 deletions ansible/roles/nextcloud/templates/config.php.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ $CONFIG = [
'overwrite.cli.url' => 'https://localhost',
'overwritehost' => '{{ nextcloud_domain }}',
'overwriteprotocol' => 'https',
'trusted_domains' => [
'localhost', '{{ nextcloud_domain }}', '{{ nextcloud_docs_domain }}',
],
'trusted_domains' => {{ nextcloud_trusted_domains | to_json }},
'trusted_proxies' => {{ nextcloud_trusted_proxies | to_json }},
/* LOGS */
'log_type' => 'file',
'logfile' => '/data/nextcloud.log',
Expand Down

0 comments on commit 7252003

Please sign in to comment.