Socket
Socket
Sign inDemoInstall

@types/koa-sslify

Package Overview
Dependencies
19
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.1 to 4.0.2

16

koa-sslify/index.d.ts

@@ -15,31 +15,31 @@ // Type definitions for koa-sslify 4.0

*/
resolver?: (ctx: koa.Context) => boolean;
resolver?: ((ctx: koa.Context) => boolean) | undefined;
/**
* Hostname for redirect (uses request host if not set)
*/
hostname?: string;
hostname?: string | undefined;
/**
* Port of HTTPS server
*/
port?: number;
port?: number | undefined;
/**
* Avoid :443 port in redirect url
*/
skipDefaultPort?: boolean;
skipDefaultPort?: boolean | undefined;
/**
* Ignore url path (redirect to domain)
*/
ignoreUrl?: boolean;
ignoreUrl?: boolean | undefined;
/**
* Temporary mode (use 307 Temporary Redirect)
*/
temporary?: boolean;
temporary?: boolean | undefined;
/**
* Whitelist methods that should be redirected
*/
redirectMethods?: string[];
redirectMethods?: string[] | undefined;
/**
* Status returned for disallowed methods
*/
disallowStatus?: number;
disallowStatus?: number | undefined;
}

@@ -46,0 +46,0 @@

{
"name": "@types/koa-sslify",
"version": "4.0.1",
"version": "4.0.2",
"description": "TypeScript definitions for koa-sslify",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-sslify",
"license": "MIT",

@@ -24,3 +25,3 @@ "contributors": [

"main": "",
"types": "index",
"types": "index.d.ts",
"repository": {

@@ -35,4 +36,4 @@ "type": "git",

},
"typesPublisherContentHash": "d1ac378c7dd646cc760bbe490a332e11c7c2b2ff18473dadaf34f5340af3f40a",
"typeScriptVersion": "2.3"
"typesPublisherContentHash": "7d05a50cd7ed79569edcafdd77fbec18efb6c9ec1079bbe2fd7a6aafca59140a",
"typeScriptVersion": "3.6"
}

@@ -5,13 +5,92 @@ # Installation

# Summary
This package contains type definitions for koa-sslify ( https://github.com/turboMaCk/koa-sslify#readme ).
This package contains type definitions for koa-sslify (https://github.com/turboMaCk/koa-sslify#readme).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-sslify
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-sslify.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-sslify/index.d.ts)
````ts
// Type definitions for koa-sslify 4.0
// Project: https://github.com/turboMaCk/koa-sslify#readme
// Definitions by: Matthew Bull <https://github.com/wingsbob>
// Mihkel Sokk <https://github.com/msokk>
// wujingtao <https://github.com/mx601595686>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
Additional Details
* Last updated: Tue, 14 May 2019 20:53:20 GMT
* Dependencies: @types/koa
import koa = require('koa');
export interface Options {
/**
* Function used to test if request is secure
*/
resolver?: ((ctx: koa.Context) => boolean) | undefined;
/**
* Hostname for redirect (uses request host if not set)
*/
hostname?: string | undefined;
/**
* Port of HTTPS server
*/
port?: number | undefined;
/**
* Avoid :443 port in redirect url
*/
skipDefaultPort?: boolean | undefined;
/**
* Ignore url path (redirect to domain)
*/
ignoreUrl?: boolean | undefined;
/**
* Temporary mode (use 307 Temporary Redirect)
*/
temporary?: boolean | undefined;
/**
* Whitelist methods that should be redirected
*/
redirectMethods?: string[] | undefined;
/**
* Status returned for disallowed methods
*/
disallowStatus?: number | undefined;
}
/**
* Default HTTPS resolver
* This works when using node.js TLS support
*/
export function httpsResolver(ctx: koa.Context): boolean;
/**
* x-forwarded-proto header resolver
* common for heroku gcp (ingress) etc
*/
export function xForwardedProtoResolver(ctx: koa.Context): boolean;
/**
* Azure resolver
* Azure is using `x-att-ssl` header
*/
export function azureResolver(ctx: koa.Context): boolean;
/**
* Custom proto header factory
*/
export function customProtoHeaderResolver(header: string): (ctx: koa.Context) => boolean;
/**
* Resolver for `Forwarded` header
* see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded
*/
export function forwardedResolver(ctx: koa.Context): boolean;
export default function factory(options?: Options): koa.Middleware;
````
### Additional Details
* Last updated: Thu, 08 Jul 2021 16:23:25 GMT
* Dependencies: [@types/koa](https://npmjs.com/package/@types/koa)
* Global values: none
# Credits
These definitions were written by Matthew Bull <https://github.com/wingsbob>, Mihkel Sokk <https://github.com/msokk>, wujingtao <https://github.com/mx601595686>.
These definitions were written by [Matthew Bull](https://github.com/wingsbob), [Mihkel Sokk](https://github.com/msokk), and [wujingtao](https://github.com/mx601595686).

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc