Skip to content

Commit

Permalink
fix up Location headers to use the frontend name
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Nov 26, 2024
1 parent 74b33cf commit 277f314
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions ansible/fastly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
fastly_service:
name: "{{ item.service }}.theforeman.org"
fastly_api_key: "{{ fastly_api_key }}"
domains: "{{ item.domains | default([{'name': item.service ~ '.theforeman.org'}]) }}"
domains: "{{ domains }}"
backends:
- name: "{{ item.backend }}.theforeman.org"
address: "{{ item.backend }}.theforeman.org"
Expand All @@ -29,6 +29,18 @@
window: 2
initial: 1
check_interval: 60000
headers:
- name: Location
action: regex
dst: http.Location
ignore_if_set: 0
priority: 10
regex: "{{ item.backend }}.theforeman.org"
src: resp.http.Location
substitution: "{{ domains[0].name }}"
type: response
vars:
domains: "{{ item.domains | default([{'name': item.service ~ '.theforeman.org'}]) }}"
with_items:
- service: archivedeb
backend: archivedeb-backend.web01.osuosl
Expand All @@ -46,5 +58,5 @@
backend: web-backend.web01.osuosl
healthcheck: index.html
domains:
- name: www.theforeman.org
- name: theforeman.org
- name: www.theforeman.org

0 comments on commit 277f314

Please sign in to comment.