Skip to main content

Module headers

Module headers 

Source
Expand description

Single-source HTTP security and caching headers for arks serve Web UI responses (governed by web-platform-baseline.sot.md WP-HDR-1..4 and WP-CACHE-1).

Git Smart HTTP (info/refs, git-upload-pack, git-receive-pack), Git LFS (info/lfs/*), and WebDAV paths are intentionally excluded from these HTML headers.

Constants§

COOP
Cross-Origin-Opener-Policy header (WP-HDR-2).
CORP
Cross-Origin-Resource-Policy header (WP-HDR-2).
HSTS
Strict-Transport-Security header (HTTPS only, WP-HDR-3).
PERMISSIONS_POLICY
Permissions-Policy header (WP-HDR-2).
REFERRER_POLICY
Referrer-Policy header (WP-HDR-3).
WEB_UI_CSP
Strict Content-Security-Policy for HTTP Web UI responses (WP-HDR-1).
WEB_UI_CSP_HTTPS
Strict Content-Security-Policy for HTTPS Web UI responses (adds upgrade-insecure-requests).
X_CONTENT_TYPE_OPTIONS
X-Content-Type-Options header (WP-HDR-3).
X_FRAME_OPTIONS
X-Frame-Options header (WP-HDR-3).

Functions§

html_cache_headers
Return HTML Cache-Control and Vary headers (WP-CACHE-1).
html_security_headers
Return the standard HTML security header pairs for arks serve Web UI responses.
is_git_wire_path
Returns true if path belongs to Git Smart/Dumb HTTP, Git LFS, or WebDAV and must never receive Web UI HTML security headers.