Features
Security headers and rate limits
This page covers two settings.
- Security headers: HTTP response headers such as HSTS and X-Frame-Options added to a proxy host's responses, so browsers apply protections like forced HTTPS and frame blocking.
- Rate limit: a limit on how many requests per second one client may send, enforced with nginx
limit_req. Requests over the limit are refused with 429 (or 503).
Both follow the same pattern: you set a global default once, and each host chooses Inherit, Override or Disable. The pattern itself is described in Global security defaults.
Where it is
| Scope | Location |
|---|---|
| Per host | Proxy host → edit → Protection tab, sections Security Headers and Rate Limit |
| Global security headers default | WAF / Blocking → Global Security Headers |
| Global rate limit default | WAF / Blocking → Global Rate Limit |
The Protection tab becomes available after the host has been saved once. While you create a new host it shows "Protection settings available after saving". Changes on this tab are saved automatically about one second after you stop editing.

Security headers
Settings
| Field | Values | Header sent |
|---|---|---|
| HSTS (HTTP Strict Transport Security) → Enable | on/off | Strict-Transport-Security: max-age=31536000 |
| Include Subdomains | on/off | adds ; includeSubDomains to the HSTS value |
| X-Frame-Options | DENY, SAMEORIGIN, None | X-Frame-Options |
| Referrer-Policy | no-referrer, strict-origin, strict-origin-when-cross-origin | Referrer-Policy |
| X-Content-Type-Options: nosniff | on/off | X-Content-Type-Options: nosniff |
| X-XSS-Protection | on/off | X-XSS-Protection: 1; mode=block |
The global default starts with HSTS on (one year, subdomains included), SAMEORIGIN, strict-origin-when-cross-origin, nosniff on and X-XSS-Protection on. The Global Security Headers toggle itself starts off, so hosts that inherit get no headers until you turn it on. New proxy hosts start on Inherit.
The HSTS max-age is fixed at one year (31536000 seconds) and cannot be changed in the panel. No preload directive is sent.
Content-Security-Policy and Permissions-Policy
These two headers break sites easily when they are wrong, so the form does not offer them. If you need them, add them to the custom nginx configuration on the proxy host's Advanced tab.
add_header Content-Security-Policy "default-src 'self'" always;
add_header Permissions-Policy "camera=(), microphone=()" always;Rate limit

Settings
| Field | Description |
|---|---|
| Requests per Second | The sustained number of requests per second allowed for one client (per the Limit By key). |
| Burst Size | How many extra requests a short burst may add. Requests beyond that are refused immediately (nodelay). |
| Limit By | How requests are grouped: IP Address, URI or IP + URI. |
| Response Code | The code returned when the limit is exceeded: 429 Too Many Requests or 503 Service Unavailable. |
| Whitelist IPs | IP addresses and CIDR ranges that are not limited, separated by commas or line breaks; a trailing # comment is allowed. An invalid value is named and the save is refused. |
| Domains | A domain whose address changes, such as a DDNS name. NPG looks it up on a schedule and treats the addresses like whitelist entries. Those addresses still get the WAF and bans. |
When a host chooses Override, the form starts at 50 requests per second, burst 100, IP Address and 429. The global default starts with the same values, and the Global Rate Limit toggle starts off.
How it works
- Each host has its own counter (an nginx
limit_reqzone). Hosts that inherit the global default share the values, not the count. GETandHEADrequests whose path ends in a static file extension (js, css, png, jpg, jpeg, gif, ico, svg, woff, woff2, ttf, eot, webp, avif, mp4, webm, pdf, zip, tar, gz, rar) are not counted. A path containing;, or a script followed by more path (such as/index.php/x.css), is not treated as a static file and is counted.- Whitelist IPs, addresses of the listed domains and Global Trusted IPs (Settings → WAF Auto-Ban) are not counted.
- Refused requests appear in Logs → Access Logs with the block reason Rate Limit.
Difference from the global DDoS protection
Settings → Global Settings → Advanced has a DDoS Protection (Global) section with Request Rate Limit, Connection Limit and Bandwidth Limit. These are per-IP limits for all of nginx (the http block): one counter covers requests to every host, and static files are counted too. The per-host rate limit applies in addition. Both skip Global Trusted IPs, and requests refused by either are logged with the block reason Rate Limit.
How it works with other features
- The admin panel's API has its own rate limit (
API_RATE_LIMIT_PER_MINUTEand others). It is unrelated to this setting and is set in Environment variables. - Trusted IPs, exceptions and precedence lists which trusted lists exempt a client from the rate limit.
- Behind Cloudflare or another proxy, set Settings → Trusted Proxies so the rate limit counts visitors' addresses rather than the proxy's. See Running behind Cloudflare.
Limits
- The HSTS
max-ageand preload cannot be changed in the panel. - Content-Security-Policy and Permissions-Policy have to be written in the advanced configuration.
- The per-host rate limit counts requests only, not connections or bandwidth. Connection and bandwidth limits exist only in the global DDoS protection above.