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"], factory);
|
8 | }
|
9 | })(function (require, exports) {
|
10 | "use strict";
|
11 | Object.defineProperty(exports, "__esModule", { value: true });
|
12 | function filterUrl() {
|
13 | return function (request, _response, next) {
|
14 | request.url = removeLineNumberRequest(request.url);
|
15 | next();
|
16 | };
|
17 | }
|
18 | exports.default = filterUrl;
|
19 | function removeLineNumberRequest(url) {
|
20 | if (!url || url.indexOf('?') >= 0) {
|
21 | return url;
|
22 | }
|
23 | return url.split(':')[0];
|
24 | }
|
25 | });
|
26 |
|
\ | No newline at end of file |