remove cors

This commit is contained in:
lovej 2021-12-08 13:52:07 +08:00
parent 3d06055292
commit 64c1750c20
1 changed files with 0 additions and 4 deletions

View File

@ -12,10 +12,6 @@ function md5(str) {
module.exports = class extends Base {
async __before() {
if (['userRegister', 'userLogin', 'noteShare', 'bookmarkDownload', 'hotBookmarks', 'hotBookmarksRandom'].indexOf(this.ctx.action) >= 0) {
this.header("Access-Control-Allow-Origin", this.header("origin") || "*");
this.header("Access-Control-Allow-Headers", "x-requested-with");
this.header("Access-Control-Allow-Methods", "GET,POST,OPTIONS,PUT,DELETE");
this.header('Access-Control-Allow-Credentials', true);
return;
}
try {