You've already forked KemoFureApi
cors test
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from __future__ import annotations
|
||||
import json
|
||||
from flask_cors import cross_origin
|
||||
from flask_restful import Resource
|
||||
from flask import current_app as app, jsonify, request
|
||||
from typing import TYPE_CHECKING
|
||||
@@ -8,8 +9,9 @@ if TYPE_CHECKING:
|
||||
from modules.Archive.database import Database
|
||||
|
||||
class Archive_SetAction(Resource):
|
||||
@cross_origin(supports_credentials=True)
|
||||
def post(self):
|
||||
data = request.json
|
||||
data = request.get_json()
|
||||
|
||||
try:
|
||||
bypass = "allow_override" in data and data["allow_override"]
|
||||
|
||||
Reference in New Issue
Block a user