Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
implement CORS
Browse files Browse the repository at this point in the history
Merge pull request #41 from auto-trading-temp-name/CORS
  • Loading branch information
CelestialCrafter authored Dec 7, 2023
2 parents 387ab1c + 5d4a690 commit 86ec1f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from threading import Thread
from dotenv import load_dotenv
from flask import Flask
from flask_cors import CORS
from werkzeug.middleware.proxy_fix import ProxyFix
from price import update_cached_prices
from views import internal_checker, plot, worth, interval, update_interval
Expand All @@ -10,6 +11,7 @@

app = Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app)
CORS(app)

app.add_url_rule('/plot/<algorithm>', view_func=plot.plot)
app.add_url_rule('/worth/<bot_id>', view_func=worth.worth)
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ dependencies:
- backtrader==1.9.78.123
- certifi==2023.11.17
- dnspython==2.4.2
- flask-cors==4.0.0
- hiredis==2.2.3
- idna==3.6
- pyjwt==2.8.0
Expand Down

0 comments on commit 86ec1f1

Please sign in to comment.