How to use the koa-sslify.customProtoHeaderResolver function in koa-sslify

To help you get started, we’ve selected a few koa-sslify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / koa-sslify / koa-sslify-tests.ts View on Github external
import sslify, { xForwardedProtoResolver, azureResolver, customProtoHeaderResolver, forwardedResolver } from 'koa-sslify';

new Koa().use(sslify());

new Koa().use(sslify({}));

new Koa().use(sslify({
    resolver: xForwardedProtoResolver,
}));

new Koa().use(sslify({
    resolver: azureResolver,
}));

new Koa().use(sslify({
    resolver: customProtoHeaderResolver('x-protocol'),
}));

new Koa().use(sslify({
    resolver: forwardedResolver,
}));

new Koa().use(sslify({
    disallowStatus: 405,
}));

new Koa().use(sslify({
    port: 1234,
}));

new Koa().use(sslify({
    hostname: 'my-host',

koa-sslify

Enforces HTTPS for node.js koa projects

MIT
Latest version published 2 years ago

Package Health Score

50 / 100
Full package analysis