koa 2.16.2 → 2.16.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/response.js +0 -5
  2. package/package.json +8 -9
package/lib/response.js CHANGED
@@ -243,11 +243,6 @@ module.exports = {
243
243
  _getBackReferrer() {
244
244
  const referrer = this.ctx.get('Referrer');
245
245
  if (referrer) {
246
- // referrer is a relative path
247
- if (referrer.startsWith('/')) {
248
- return referrer;
249
- }
250
-
251
246
  // referrer is an absolute URL, check if it's the same origin
252
247
  const url = new URL(referrer, this.ctx.href);
253
248
  if (url.host === this.ctx.host) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koa",
3
- "version": "2.16.2",
3
+ "version": "2.16.3",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "tag": "latest-2"
@@ -25,13 +25,6 @@
25
25
  "./package": "./package.json",
26
26
  "./package.json": "./package.json"
27
27
  },
28
- "scripts": {
29
- "test": "jest --forceExit",
30
- "lint": "eslint --ignore-path .gitignore .",
31
- "authors": "git log --format='%aN <%aE>' | sort -u > AUTHORS",
32
- "build": "gen-esm-wrapper . ./dist/koa.mjs",
33
- "prepare": "npm run build"
34
- },
35
28
  "repository": "koajs/koa",
36
29
  "keywords": [
37
30
  "web",
@@ -89,5 +82,11 @@
89
82
  ],
90
83
  "jest": {
91
84
  "testEnvironment": "node"
85
+ },
86
+ "scripts": {
87
+ "test": "jest --forceExit",
88
+ "lint": "eslint --ignore-path .gitignore .",
89
+ "authors": "git log --format='%aN <%aE>' | sort -u > AUTHORS",
90
+ "build": "gen-esm-wrapper . ./dist/koa.mjs"
92
91
  }
93
- }
92
+ }