Adding CORS module - Solves Chrome extension API connectivity (#2236)

update-pyppeteer-ng
dgtlmoon 10 months ago committed by GitHub
parent de776800e9
commit 994d34c776
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -30,6 +30,7 @@ from flask_compress import Compress as FlaskCompress
from flask_login import current_user from flask_login import current_user
from flask_paginate import Pagination, get_page_parameter from flask_paginate import Pagination, get_page_parameter
from flask_restful import abort, Api from flask_restful import abort, Api
from flask_cors import CORS
from flask_wtf import CSRFProtect from flask_wtf import CSRFProtect
from loguru import logger from loguru import logger
@ -53,6 +54,9 @@ app = Flask(__name__,
static_folder="static", static_folder="static",
template_folder="templates") template_folder="templates")
# Enable CORS, especially useful for the Chrome extension to operate from anywhere
CORS(app)
# Super handy for compressing large BrowserSteps responses and others # Super handy for compressing large BrowserSteps responses and others
FlaskCompress(app) FlaskCompress(app)

@ -9,6 +9,7 @@ flask-login>=0.6.3
flask-paginate flask-paginate
flask_expects_json~=1.7 flask_expects_json~=1.7
flask_restful flask_restful
flask_cors # For the Chrome extension to operate
flask_wtf~=1.2 flask_wtf~=1.2
flask~=2.3 flask~=2.3
inscriptis~=2.2 inscriptis~=2.2

Loading…
Cancel
Save