Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,113 of 9,113 pages
About the help in other languages
All help pages

Check the security headers

Step by step - check from outside that every Exponential siteaccess sends the expected security headers and cookie flags, that internal files are not served, and record the result as evidence for an audit.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/government/tasks/compliance/check-the-security-headers.md

On this page

Check the security headers

For administrators and hosting teams, after a change of the web server, a deploy, or monthly as evidence. The commands come from Security and audit, 1 and 13.9.

Contents

  1. Before you start
  2. Steps
  3. What to expect
  4. Recording the result
  5. Related pages

Before you start

  • A shell with curl, outside the server's network if possible (a check from inside can bypass a proxy).
  • The list of host names: public siteaccesses and the administration.

Steps

for host in www.example.gov admin.example.gov; do
  echo "== $host"
  curl -sI "https://$host/" | grep -i -E 'x-content-type|x-frame|referrer|permissions|content-security|strict-transport'
  curl -sI "https://$host/user/login" | grep -i set-cookie
done
for p in .env .git/config settings/site.ini composer.json extension/expservices/ezinfo.php; do
  curl -s -o /dev/null -w "$p %{http_code}\n" "https://www.example.gov/$p"
done

What to expect

CheckExpected
x-content-type-optionsnosniff
x-frame-optionsSAMEORIGIN
content-security-policyframe-ancestors 'self'; on the administration also a policy or a report-only policy
referrer-policystrict-origin-when-cross-origin
permissions-policycamera=(), microphone=(), payment=(), usb=()
strict-transport-securityyour value, once set
session cookieSecure; HttpOnly; SameSite=Lax
internal files404, or an Exponential page, never the file's content

A missing header after a change usually means an override replaced the list or a proxy strips headers.

Recording the result

Save the output with the date and host in your security documentation. Compare with the previous month; any difference needs an explanation.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x