Merge pull request #3344 from freqtrade/fix_cors_policy

CORS - allow authenticated responses
This commit is contained in:
hroff-1902
2020-05-20 21:44:30 +03:00
committed by GitHub
2 changed files with 17 additions and 9 deletions

View File

@@ -89,7 +89,9 @@ class ApiServer(RPC):
self._config = freqtrade.config
self.app = Flask(__name__)
self._cors = CORS(self.app, resources={r"/api/*": {"origins": "*"}})
self._cors = CORS(self.app,
resources={r"/api/*": {"supports_credentials": True, }}
)
# Setup the Flask-JWT-Extended extension
self.app.config['JWT_SECRET_KEY'] = self._config['api_server'].get(