Skip to main content

Referer Restriction Configuration

The referer-restriction plugin allows or rejects requests according to the host in the Referer header on selected routes and services. Configuration covers plugin parameters.

Parameters​

See plugin common configurations for configuration options available to all plugins.

  • bypass_missing

    boolean

    default: false


    If true, allow requests whose Referer header is missing or malformed. Otherwise, reject those requests.

  • whitelist

    array[string]

    valid value:

    one or more host names, optionally beginning with * for suffix matching

    Referer hosts that are allowed to access the route or service. All other hosts are rejected.

    Configure either whitelist or blacklist, but not both.

  • blacklist

    array[string]

    valid value:

    one or more host names, optionally beginning with * for suffix matching

    Referer hosts that are rejected. All other hosts are allowed.

    Configure either whitelist or blacklist, but not both.

  • message

    string

    default: Your referer host is not allowed

    valid value:

    between 1 and 1024 characters

    Message returned in the JSON response when a request is rejected.