Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix up Location headers to use the frontend name #2158

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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