Commit a741d637 authored by Guillermo Sanz López's avatar Guillermo Sanz López
Browse files

add manaje options

parent 9289fb11
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ from flask_cors import CORS

# Create Flask app
app = Flask(__name__)

CORS(app)

# Register blueprints (routes)
@@ -18,6 +19,18 @@ CORS(app)
app.register_blueprint(backoffice_routes)
app.register_blueprint(access_routes)


# @app.route("/options", methods=["OPTIONS"])
# def handle_options():
#     return "", 200


@app.route('/', defaults={'path': ''})
@app.route('/<path:path>', methods=['OPTIONS'])
def handle_options(path):     
    return '', 200


# Configure JWT
app.config["JWT_SECRET_KEY"] = "super-secret"
jwt = JWTManager(app)