1 | (function (factory) {
|
2 | if (typeof module === "object" && typeof module.exports === "object") {
|
3 | var v = factory(require, exports);
|
4 | if (v !== undefined) module.exports = v;
|
5 | }
|
6 | else if (typeof define === "function" && define.amd) {
|
7 | define(["require", "exports", "tslib", "http-errors"], factory);
|
8 | }
|
9 | })(function (require, exports) {
|
10 | "use strict";
|
11 | Object.defineProperty(exports, "__esModule", { value: true });
|
12 | var tslib_1 = require("tslib");
|
13 | var http_errors_1 = tslib_1.__importDefault(require("http-errors"));
|
14 | function unhandled() {
|
15 | return function (request, __, next) {
|
16 | if (request.method === 'GET' || request.method === 'HEAD') {
|
17 | next(http_errors_1.default(404));
|
18 | }
|
19 | else {
|
20 | next(http_errors_1.default(501));
|
21 | }
|
22 | };
|
23 | }
|
24 | exports.default = unhandled;
|
25 | });
|
26 |
|
\ | No newline at end of file |