From 553eb0876da8a79c5ffe78324bcbacd5cdd68ea0 Mon Sep 17 00:00:00 2001 From: Charly <57236391+chqr1y@users.noreply.github.com> Date: Tue, 9 Jun 2020 07:31:54 -0700 Subject: [PATCH] Added wildcard ACAO header to enable CORS for the web API. --- REQUIREMENTS | 1 + recon/core/web/__init__.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/REQUIREMENTS b/REQUIREMENTS index 4bb688a1..b3218ff2 100644 --- a/REQUIREMENTS +++ b/REQUIREMENTS @@ -7,6 +7,7 @@ requests # web flask flask-restful +flask-cors flasgger dicttoxml XlsxWriter diff --git a/recon/core/web/__init__.py b/recon/core/web/__init__.py index 708beeb7..0061a6ad 100644 --- a/recon/core/web/__init__.py +++ b/recon/core/web/__init__.py @@ -1,4 +1,5 @@ from flask import Flask, cli, render_template +from flask_cors import CORS from flasgger import Swagger from recon.core import base from recon.core.constants import BANNER_WEB @@ -41,6 +42,7 @@ def create_app(): app = Flask(__name__, static_url_path='') app.config.from_object(__name__) + CORS(app) Swagger(app, template_file='definitions.yaml') app.redis = Redis.from_url(app.config['REDIS_URL'])