Last updated

responseHeaders

You can configure custom response headers for your portal. Custom headers are added to the response header object if requested resource matches a configured pattern.

Options

Patterns map

OptionTypeDescription
{glob pattern}[Header object]REQUIRED. A glob pattern used to match requested resource. It can match any assets, routes, or both.

Header object

OptionTypeDescription
namestringResponse header name
valuestringResponse header value

Examples

The following is an example of custom headers for CSS, JS files, and a /my-markdown/ route:

responseHeaders:
  '**/*.js':
    - name: X-Content-Type-Options
      value: nosniff
    - name: Cache-Control
      value: no-cache

  '**/*.css':
    - name: X-XSS-Protection
      value: 1; mode=block

  /my-markdown/:
    - name: X-Frame-Options
      value: DENY

Resources