#13 Made login page that actually send request to backend. CORS stuff.

This commit is contained in:
2023-03-19 02:10:12 -04:00
parent 21428c520d
commit 6e7e3e66f5
6 changed files with 55 additions and 21 deletions

View File

@@ -3,10 +3,12 @@ dotenv.load_dotenv()
from app import create_app, db
from app.models import User
from flask_cors import CORS
app = create_app()
CORS(app, supports_credentials=True, resources={r"/.*": {"origins": r".*localhost.*"}})
@app.shell_context_processor
def make_shell_context():
return {'db': db, 'User': User}
return {"db": db, "User": User}