Fix redirect and servername issue in freshmaker role.
This commit is contained in:
parent
ead99e7441
commit
0da5d836e2
2 changed files with 8 additions and 7 deletions
|
@ -61,6 +61,7 @@
|
|||
- role: freshmaker/frontend
|
||||
# TLS is terminated for us at the proxy layer (like for every other app).
|
||||
freshmaker_force_ssl: False
|
||||
freshmaker_servername: freshmaker{{env_suffix}}.fedoraproject.org
|
||||
|
||||
handlers:
|
||||
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
||||
|
|
|
@ -8,13 +8,13 @@ RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
|
|||
WSGIDaemonProcess freshmaker user=fedmsg group=fedmsg threads=5 home=/usr/share/freshmaker
|
||||
WSGIScriptAlias /{{ freshmaker_endpoint }} /usr/share/freshmaker/freshmaker.wsgi
|
||||
|
||||
{% if freshmaker_servername != inventory_hostname %}
|
||||
# Redirect from the hostname of this machine to user-visible hostname.
|
||||
RewriteEngine On
|
||||
<If "%{HTTP_HOST} == '{{ inventory_hostname }}'">
|
||||
RewriteRule (.*) "%{REQUEST_SCHEME}://{{ freshmaker_servername }}%{REQUEST_URI}" [R,L]
|
||||
</If>
|
||||
{% endif %}
|
||||
##{% if freshmaker_servername != inventory_hostname %}
|
||||
### Redirect from the hostname of this machine to user-visible hostname.
|
||||
##RewriteEngine On
|
||||
##<If "%{HTTP_HOST} == '{{ inventory_hostname }}'">
|
||||
##RewriteRule (.*) "%{REQUEST_SCHEME}://{{ freshmaker_servername }}%{REQUEST_URI}" [R,L]
|
||||
##</If>
|
||||
##{% endif %}
|
||||
|
||||
{% if env == 'staging' %}
|
||||
OIDCOAuthClientID {{ freshmaker_stg_oidc_client_id }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue