haproxy: fix csp for glance image uploads via horizon
Connections to port 9292 by Horizon were blocked by content security policy. This patch permits connections to API services running on the same host as Horizon. Change-Id: I17d3f079ddbd4f0150c4b01f822818db52083d21 Related-Bug: #1971179
This commit is contained in:
parent
4ac454f594
commit
0feafaf1be
@ -42,7 +42,7 @@ haproxy_security_headers_max_age: 31536000
|
||||
# Set CSP headers to report only for testing
|
||||
haproxy_security_headers_csp_report_only: False
|
||||
# To override the CSP used by a specific service define a variable haproxy_<service name>_csp
|
||||
haproxy_security_headers_csp: "http-response set-header {{ haproxy_security_headers_csp_report_only | ternary('Content-Security-Policy-Report-Only', 'Content-Security-Policy') }} \"default-src 'self'; frame-ancestors 'none'; form-action 'self'; upgrade-insecure-requests; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; child-src 'self' {{ external_lb_vip_address }}:{{ nova_console_port }}; frame-src 'self' {{ external_lb_vip_address }}:{{ nova_console_port }}; img-src 'self' data:; worker-src blob:;\""
|
||||
haproxy_security_headers_csp: "http-response set-header {{ haproxy_security_headers_csp_report_only | ternary('Content-Security-Policy-Report-Only', 'Content-Security-Policy') }} \"default-src 'self'; frame-ancestors 'none'; form-action 'self'; upgrade-insecure-requests; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; child-src 'self' {{ external_lb_vip_address }}:{{ nova_console_port }}; frame-src 'self' {{ external_lb_vip_address }}:{{ nova_console_port }}; connect-src 'self' {{ external_lb_vip_address }}:*; img-src 'self' data:; worker-src blob:;\""
|
||||
# To disable security headers set to []
|
||||
haproxy_security_headers:
|
||||
- "http-response set-header Strict-Transport-Security \"max-age={{ haproxy_security_headers_max_age }}; includeSubDomains;\""
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixes a Content Security Policy error which prevented image uploads via
|
||||
the Horizon interface.
|
Loading…
x
Reference in New Issue
Block a user