Liking cljdoc? Tell your friends :D

macchiato.middleware.ssl

Middleware for managing handlers operating over HTTPS.

Middleware for managing handlers operating over HTTPS.
raw docstring

default-scheme-headercljs

The default header used in wrap-forwarded-scheme (x-forwarded-proto).

The default header used in wrap-forwarded-scheme (x-forwarded-proto).
sourceraw docstring

forwarded-scheme-requestcljs

(forwarded-scheme-request request)
(forwarded-scheme-request request header)

Change the :scheme of the request to the value present in a request header. See: wrap-forwarded-scheme.

Change the :scheme of the request to the value present in a request header.
See: wrap-forwarded-scheme.
sourceraw docstring

hsts-responsecljs

(hsts-response response)
(hsts-response response options)

Add the Strict-Transport-Security header to the response. See: wrap-hsts.

Add the Strict-Transport-Security header to the response. See: wrap-hsts.
sourceraw docstring

ssl-redirect-responsecljs

(ssl-redirect-response request options)

Given a HTTP request, return a redirect response to the equivalent HTTPS URL. See: wrap-ssl-redirect.

Given a HTTP request, return a redirect response to the equivalent HTTPS URL.
See: wrap-ssl-redirect.
sourceraw docstring

urlcljs

source

wrap-forwarded-schemecljs

(wrap-forwarded-scheme handler)
(wrap-forwarded-scheme handler header)

Middleware that changes the :scheme of the request map to the value present in a request header. This is useful if your application sits behind a reverse proxy or load balancer that handles the SSL transport.

The header defaults to x-forwarded-proto.

Middleware that changes the :scheme of the request map to the value present
in a request header. This is useful if your application sits behind a
reverse proxy or load balancer that handles the SSL transport.

The header defaults to x-forwarded-proto.
sourceraw docstring

wrap-hstscljs

(wrap-hsts handler)
(wrap-hsts handler options)

Middleware that adds the Strict-Transport-Security header to the response from the handler. This ensures the browser will only use HTTPS for future requests to the domain.

Accepts the following options:

:max-age - the max time in seconds the HSTS policy applies (defaults to 31536000 seconds, or 1 year)

:include-subdomains? - true if subdomains should be included in the HSTS policy (defaults to true)

See RFC 6797 for more information (https://tools.ietf.org/html/rfc6797).

Middleware that adds the Strict-Transport-Security header to the response
from the handler. This ensures the browser will only use HTTPS for future
requests to the domain.

Accepts the following options:

:max-age             - the max time in seconds the HSTS policy applies
                       (defaults to 31536000 seconds, or 1 year)

:include-subdomains? - true if subdomains should be included in the HSTS
                       policy (defaults to true)

See RFC 6797 for more information (https://tools.ietf.org/html/rfc6797).
sourceraw docstring

wrap-ssl-redirectcljs

(wrap-ssl-redirect handler)
(wrap-ssl-redirect handler options)

Middleware that redirects any HTTP request to the equivalent HTTPS URL.

Accepts the following options:

:ssl-port - the SSL port to use for redirects, defaults to 443.

Middleware that redirects any HTTP request to the equivalent HTTPS URL.

Accepts the following options:

:ssl-port - the SSL port to use for redirects, defaults to 443.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close