Skip to content

Commit

Permalink
Merge pull request #2572 from fett0/T5796
Browse files Browse the repository at this point in the history
T5796:backport-add/fixed OCSERV HTTP security headers
  • Loading branch information
c-po authored Dec 16, 2023
2 parents b149a38 + ad65d37 commit e5fcf49
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
17 changes: 17 additions & 0 deletions data/templates/ocserv/ocserv_config.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,20 @@ route = {{ network_settings.push_route }}
route = {{ route }}
{% endfor %}
{% endif %}

{% if http_security_headers is defined %}
# HTTP security headers
included-http-headers = Strict-Transport-Security: max-age=31536000 ; includeSubDomains
included-http-headers = X-Frame-Options: deny
included-http-headers = X-Content-Type-Options: nosniff
included-http-headers = Content-Security-Policy: default-src ´none´
included-http-headers = X-Permitted-Cross-Domain-Policies: none
included-http-headers = Referrer-Policy: no-referrer
included-http-headers = Clear-Site-Data: "cache","cookies","storage"
included-http-headers = Cross-Origin-Embedder-Policy: require-corp
included-http-headers = Cross-Origin-Opener-Policy: same-origin
included-http-headers = Cross-Origin-Resource-Policy: same-origin
included-http-headers = X-XSS-Protection: 0
included-http-headers = Pragma: no-cache
included-http-headers = Cache-control: no-store, no-cache
{% endif %}
6 changes: 6 additions & 0 deletions interface-definitions/vpn_openconnect.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@
</leafNode>
</children>
</node>
<leafNode name="http-security-headers">
<properties>
<help>Enable HTTP security headers</help>
<valueless/>
</properties>
</leafNode>
<node name="ssl">
<properties>
<help>SSL Certificate, SSL Key and CA (/config/auth)</help>
Expand Down

0 comments on commit e5fcf49

Please sign in to comment.