Browse Source

小调整

zjcqoo 6 năm trước cách đây
mục cha
commit
10d29de83e
3 tập tin đã thay đổi với 5 bổ sung3 xóa
  1. 2 0
      api.conf
  2. 2 3
      cf-worker/.eslintrc.json
  3. 1 0
      cf-worker/index.js

+ 2 - 0
api.conf

@@ -61,6 +61,8 @@ location = /http {
     'content-security-policy'
     'content-security-policy-report-only'
     'x-frame-options'
+    'alt-svc'
+    'clear-site-data'
   ;
   header_filter_by_lua_file   ../lua/http-enc-res-hdr.lua;
   body_filter_by_lua_file     ../lua/http-body-hash.lua;

+ 2 - 3
cf-worker/.eslintrc.json

@@ -1,7 +1,8 @@
 {
   "env": {
     "browser": true,
-    "es6": true
+    "es6": true,
+    "serviceworker": true
   },
   "extends": "eslint:recommended",
   "globals": {
@@ -13,10 +14,8 @@
     "sourceType": "module"
   },
   "rules": {
-    "no-console": "warn",
     "no-empty": "warn",
     "no-unused-vars": "warn",
-    "no-debugger": "warn",
     "no-constant-condition": "warn"
   }
 }

+ 1 - 0
cf-worker/index.js

@@ -228,6 +228,7 @@ async function proxy(urlObj, reqInit, acehOld, rawLen, retryTimes) {
 
   resHdrNew.delete('content-security-policy')
   resHdrNew.delete('content-security-policy-report-only')
+  resHdrNew.delete('clear-site-data')
 
   if (status === 301 ||
       status === 302 ||