diff options
Diffstat (limited to 'config/cors.js')
-rw-r--r-- | config/cors.js | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/config/cors.js b/config/cors.js deleted file mode 100644 index 7ebbe3f..0000000 --- a/config/cors.js +++ /dev/null | |||
@@ -1,86 +0,0 @@ | |||
1 | |||
2 | module.exports = { | ||
3 | /* | ||
4 | |-------------------------------------------------------------------------- | ||
5 | | Origin | ||
6 | |-------------------------------------------------------------------------- | ||
7 | | | ||
8 | | Set a list of origins to be allowed. The value can be one of the following | ||
9 | | | ||
10 | | Boolean: true - Allow current request origin | ||
11 | | Boolean: false - Disallow all | ||
12 | | String - Comma separated list of allowed origins | ||
13 | | Array - An array of allowed origins | ||
14 | | String: * - A wildcard to allow current request origin | ||
15 | | Function - Receives the current origin and should return one of the above values. | ||
16 | | | ||
17 | */ | ||
18 | origin: false, | ||
19 | |||
20 | /* | ||
21 | |-------------------------------------------------------------------------- | ||
22 | | Methods | ||
23 | |-------------------------------------------------------------------------- | ||
24 | | | ||
25 | | HTTP methods to be allowed. The value can be one of the following | ||
26 | | | ||
27 | | String - Comma separated list of allowed methods | ||
28 | | Array - An array of allowed methods | ||
29 | | | ||
30 | */ | ||
31 | methods: ['GET', 'PUT', 'PATCH', 'POST', 'DELETE'], | ||
32 | |||
33 | /* | ||
34 | |-------------------------------------------------------------------------- | ||
35 | | Headers | ||
36 | |-------------------------------------------------------------------------- | ||
37 | | | ||
38 | | List of headers to be allowed via Access-Control-Request-Headers header. | ||
39 | | The value can be one of the following. | ||
40 | | | ||
41 | | Boolean: true - Allow current request headers | ||
42 | | Boolean: false - Disallow all | ||
43 | | String - Comma separated list of allowed headers | ||
44 | | Array - An array of allowed headers | ||
45 | | String: * - A wildcard to allow current request headers | ||
46 | | Function - Receives the current header and should return one of the above values. | ||
47 | | | ||
48 | */ | ||
49 | headers: true, | ||
50 | |||
51 | /* | ||
52 | |-------------------------------------------------------------------------- | ||
53 | | Expose Headers | ||
54 | |-------------------------------------------------------------------------- | ||
55 | | | ||
56 | | A list of headers to be exposed via `Access-Control-Expose-Headers` | ||
57 | | header. The value can be one of the following. | ||
58 | | | ||
59 | | Boolean: false - Disallow all | ||
60 | | String: Comma separated list of allowed headers | ||
61 | | Array - An array of allowed headers | ||
62 | | | ||
63 | */ | ||
64 | exposeHeaders: false, | ||
65 | |||
66 | /* | ||
67 | |-------------------------------------------------------------------------- | ||
68 | | Credentials | ||
69 | |-------------------------------------------------------------------------- | ||
70 | | | ||
71 | | Define Access-Control-Allow-Credentials header. It should always be a | ||
72 | | boolean. | ||
73 | | | ||
74 | */ | ||
75 | credentials: false, | ||
76 | |||
77 | /* | ||
78 | |-------------------------------------------------------------------------- | ||
79 | | MaxAge | ||
80 | |-------------------------------------------------------------------------- | ||
81 | | | ||
82 | | Define Access-Control-Allow-Max-Age | ||
83 | | | ||
84 | */ | ||
85 | maxAge: 90, | ||
86 | }; | ||