-
Notifications
You must be signed in to change notification settings - Fork 57
/
index.ts
34 lines (30 loc) · 1.11 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { ModuleOptions as CsrfOptions } from 'nuxt-csurf'
import type { Options as RemoveOptions } from 'unplugin-remove/types'
import { SecurityHeaders } from './headers'
import { AllowedHTTPMethods, BasicAuth, CorsOptions, NonceOptions, RateLimiter, RequestSizeLimiter, XssValidator } from './middlewares'
export type Ssg = {
hashScripts?: boolean;
};
export interface ModuleOptions {
headers: SecurityHeaders | false;
requestSizeLimiter: RequestSizeLimiter | false;
rateLimiter: RateLimiter | false;
xssValidator: XssValidator | false;
corsHandler: CorsOptions | false;
allowedMethodsRestricter: AllowedHTTPMethods | false;
hidePoweredBy: boolean;
basicAuth: BasicAuth | false;
enabled: boolean;
csrf: CsrfOptions | false;
nonce: NonceOptions | false;
removeLoggers?: RemoveOptions | false;
ssg?: Ssg;
}
export interface NuxtSecurityRouteRules {
requestSizeLimiter?: RequestSizeLimiter | false;
rateLimiter?: RateLimiter | false;
xssValidator?: XssValidator | false;
corsHandler?: CorsOptions | false;
allowedMethodsRestricter?: AllowedHTTPMethods | false;
nonce?: NonceOptions | false;
}