Module

Hyper.Sslify.Options

Package
purescript-hyper-sslify
Repository
anilanar/purescript-hyper-sslify

#Options Source

type Options = { hostname :: Maybe String, ignoreUrl :: Boolean, internalRedirectMethods :: Array Method, permanent :: Boolean, port :: Int, redirectMethods :: Array Method, skipDefaultPort :: Boolean, specCompliantDisallow :: Boolean, trustAzureHeader :: Boolean, trustProtoHeader :: Boolean }

Options that are used for both isSecure and redirectInsecure.

  • trustProtoHeader: trust "x-forwarded-proto" header from Heroku or from other cloud services.
  • trustAzureHeader: trust Azure's x-arr-ssl header
  • port: HTTPS port
  • hostname: host name for redirect; when Nothing, it redirects to same host.
  • ignoreUrl: ignore request url, redirect all request to root.
  • permanent: use HTTP 301 instead of HTTP 302 for redirection
  • skipDefaultPort: when false, adds ":443" port to the redirection URL
  • redirectMethods: allowed HTTP methods for redirection; if method is not allowed, responds with HTTP 40x status
  • internalRedirectMethods: allowed HTTPS methods for internal redirection, using HTTP 307 status code; can be used for redirecting methods other than GET and HEAD with the same method.
  • specCompliantDisallow: if true, rejects disallowed methods with HTTP 403.

#defaultOptions Source