Add _a analytics handler to caddy
This commit is contained in:
parent
13100548b9
commit
6c6ade1b9a
3 changed files with 14 additions and 2 deletions
|
@ -35,3 +35,11 @@
|
||||||
header_up Host {http.reverse_proxy.upstream.hostport}
|
header_up Host {http.reverse_proxy.upstream.hostport}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(analytics) {
|
||||||
|
handle_path /_a/* {
|
||||||
|
reverse_proxy https://analytics.serguzim.me {
|
||||||
|
header_up Host {http.reverse_proxy.upstream.hostport}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -26,12 +26,14 @@
|
||||||
src: Caddyfile.j2
|
src: Caddyfile.j2
|
||||||
dest: "{{ (config_path, 'Caddyfile') | path_join }}"
|
dest: "{{ (config_path, 'Caddyfile') | path_join }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
notify: Reload caddy
|
||||||
|
|
||||||
- name: Copy snippets file
|
- name: Copy snippets file
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: snippets
|
src: snippets
|
||||||
dest: "{{ (config_path, 'snippets') | path_join }}"
|
dest: "{{ (config_path, 'snippets') | path_join }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
notify: Reload caddy
|
||||||
|
|
||||||
- name: Create sites-config directory
|
- name: Create sites-config directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
|
|
@ -5,6 +5,8 @@ reitanlage_oranienburg_svc:
|
||||||
www_domain: true
|
www_domain: true
|
||||||
port: 80
|
port: 80
|
||||||
caddy_extra: |
|
caddy_extra: |
|
||||||
|
import analytics
|
||||||
|
|
||||||
header /images/* Cache-Control "max-age=31536000"
|
header /images/* Cache-Control "max-age=31536000"
|
||||||
header /assets/* Cache-Control "max-age=2629800"
|
header /assets/* Cache-Control "max-age=2629800"
|
||||||
header /user/themes/* Cache-Control "max-age=2629800"
|
header /user/themes/* Cache-Control "max-age=2629800"
|
||||||
|
|
Reference in a new issue