File tree 2 files changed +3
-3
lines changed
packages/middleware-allow-request-methods
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ const { UserInputError } = require('@dotcom-reliability-kit/errors');
11
11
/**
12
12
* Create a middleware function to return 405 (rather than 404) for disallowed request methods.
13
13
*
14
- * @param {RequestMethodOptions } [ options]
14
+ * @param {RequestMethodOptions } options
15
15
* @returns {RequestHandler } - Returns an Express middleware function.
16
16
*/
17
17
function allowRequestMethods ( options = { allowedMethods : [ ] } ) {
Original file line number Diff line number Diff line change @@ -2,10 +2,10 @@ import { RequestHandler } from 'express';
2
2
3
3
declare module '@dotcom-reliability-kit/middleware-allow-request-methods' {
4
4
export type RequestMethodOptions = {
5
- allowedMethods ? : string [ ] ;
5
+ allowedMethods : string [ ] ;
6
6
} ;
7
7
8
8
declare function allowRequestMethods (
9
- options ? : RequestMethodOptions
9
+ options : RequestMethodOptions
10
10
) : RequestHandler ;
11
11
}
You can’t perform that action at this time.
0 commit comments