Skip to content

Commit

Permalink
Fix ipa-rewrite.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
cmd-ntrf committed Dec 16, 2024
1 parent e84ebe8 commit 090635e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions site/profile/manifests/freeipa.pp
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@
mode => '0755',
}

$proxy_domain = lookup('profile::reverse_proxy::domain_name')
$ipa_domain = lookup('profile::freeipa::base::ipa_domain')

package { 'ipa-server-dns':
Expand Down Expand Up @@ -392,9 +393,9 @@
content => epp(
'profile/freeipa/ipa-rewrite.conf',
{
'referee' => $fqdn,
'referer' => "ipa.${ipa_domain}",
'referer_int' => "ipa.${ipa_domain}",
'referee' => $fqdn,
'external_hostname' => "ipa.${proxy_domain}",
'internal_hosntmae' => "ipa.${ipa_domain}",
}
),
notify => Service['httpd'],
Expand Down
4 changes: 2 additions & 2 deletions site/profile/templates/freeipa/ipa-rewrite.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ RewriteRule ^/$ /ipa/ui [L,NC,R=301]
# Rewrite for plugin index, make it like it's a static file
RewriteRule ^/ipa/ui/js/freeipa/plugins.js$ /ipa/wsgi/plugins.py [PT]

RequestHeader edit Referer ^https://<%= regsubst("${referer}", '\.', '\.', 'G') %> https://<%= $referee %>
RequestHeader edit Referer ^https://<%= regsubst("${referer_int}", '\.', '\.', 'G') %> https://<%= $referee %>
RequestHeader edit Referer ^https://<%= regsubst("${external_hostname}", '\.', '\.', 'G') %> https://<%= $referee %>
RequestHeader edit Referer ^https://<%= regsubst("${internal_hostname}", '\.', '\.', 'G') %> https://<%= $referee %>

0 comments on commit 090635e

Please sign in to comment.