Security headers tell browsers how to handle your published app, adding protection against common attacks. Configure them under Security → Advanced in the App Builder. New apps start with X-Frame-Options on, set to SAMEORIGIN + Hercules previews, and HSTS and Permissions-Policy off, so you turn on only what you need. Apps created before X-Frame-Options became a default have it off until you turn it on.
Where do I configure security headers?
Click Security in the Build section of the App Builder sidebar, then open the Advanced tab. Each header has its own card with a toggle to turn it on, plus its own Save button. Changes apply to your published app.
What is HSTS?
HSTS (HTTP Strict Transport Security) tells browsers to only load your app over HTTPS (the secure, encrypted version of a web address). Turn it on to stop browsers from ever loading your app over an insecure connection.
Options:
- Max age: How long browsers remember the HTTPS-only rule, from 1 month to 12 months.
- Apply to subdomains (includeSubDomains): Extends the rule to every subdomain under your domain.
- Preload: Adds your app to the browser preload list, so browsers use HTTPS on the very first visit. This needs Apply to subdomains turned on and a 12 month max age.
What is X-Frame-Options?
X-Frame-Options controls whether other websites can embed your app in an iframe (your page shown inside another site's page). This helps prevent clickjacking (tricking users into clicking hidden elements).
Choose a value:
- DENY: No other site can embed your app.
- SAMEORIGIN: Only pages on your own domain can embed your app.
- SAMEORIGIN + Hercules previews: Pages on your own domain can embed your app, and so can hercules.app, which shows a live preview of an app on a public profile and on template pages. New apps start with this one. X-Frame-Options can't allow a second site, so Hercules sends this choice as a
Content-Security-Policy: frame-ancestors 'self' https://hercules.appheader instead.
To embed your app on another website, turn X-Frame-Options off.
What is Permissions-Policy?
Permissions-Policy blocks browser features your app does not use, such as camera, microphone, geolocation, and payment. Turn on the features you want to block. Features you leave unchecked keep their default browser behavior.
Do security headers change my app's code?
No. Headers are added to the responses your published app sends to browsers. Your app's code and content stay the same.
Additional FAQ
Do I need to enable these headers?
No. They are optional hardening for your published app. Turn on the ones that fit your needs.
Why is the HSTS Preload toggle disabled?
Preload requires Apply to subdomains turned on and a 12 month max age. Set both and the toggle becomes available.
What happens when I enable HSTS?
Hercules shows a confirmation that explains the HTTPS lock-in and caching trade-offs before you save. Read it, then confirm to continue.
How is this different from a Security Audit?
A Security Audit reviews your app for vulnerabilities and suggests fixes. Security headers are settings you configure to harden your published app. Use both together.
Can I set other security or SEO headers?
The headers on this page are configured from the Hercules UI under Security → Advanced.
For any other code-based security or SEO headers, ask the Hercules App Builder Agent to
configure them directly in your code. Static apps set them in a _headers file, and
server-rendered apps set them in server code.