Add api dependencies
This commit is contained in:
12
main.py
12
main.py
@@ -8,7 +8,17 @@ from config import config
|
||||
|
||||
def create_app():
|
||||
app = Flask(__name__)
|
||||
CORS(app)
|
||||
|
||||
origins = [
|
||||
"http://localhost:3000",
|
||||
"http://127.0.0.1:3000"
|
||||
]
|
||||
CORS(app, supports_credentials=True, origins=origins)
|
||||
|
||||
app.config.update(
|
||||
SESSION_COOKIE_SAMESITE="None", # necessary for cross-site cookies
|
||||
SESSION_COOKIE_SECURE=False # True in prod (HTTPS)
|
||||
)
|
||||
|
||||
env = os.environ.get('FLASK_ENV', 'default')
|
||||
app.config.from_object(config[env])
|
||||
|
||||
Reference in New Issue
Block a user