Currently my Flask is serving from root path like http://example.com/ so it basically serves every request incoming to it. But I have the necessity to serve http://example.com/start from Apache and not trough Flask.
So I'd like to know if there is any way to tell Flask to ignore @app.route("/start") or to tell Flask to let apache override the path serving.
I'm using a shared host server so I don't have access to apache configuration files.
Thanks in advance, if there is any information needed feel free to ask.
By the time Flask is handling a request, the web server has already passed the request to the application and is awaiting a response. At that point, there's no protocol for Flask to "cancel" handling the request. You'll need to modify Apache's configuration to only pass requests which do not match your path to the Flask application. If you're on a shared host, you might still be able to modify an .htaccess file to set up the forwarding rules.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With