Hi, I have a weird issue.
Using Flask-CORS as documented works if the Flask app is started with flask run.
Since I want to have the app ready on other devices, I've added an entry in entry_points in setup.py so that
This allows me to run the web app by running cashiersync from the console. It does indeed start but the CORS headers are not present!
If, instead, I do
export FLASK_APP=cashiersync.app
flask run
on the client machine, the headers are present again. The rest of the code is identical.
I'm a bit puzzled about this behaviour. Could you provide any ideas? I'd like to be able to have a console script for starting the server come packaged in pip package, if possible.
The package is called cashiersync and is available on PyPi.
The source code for the project is available at https://gitlab.com/alensiljak/cashier-sync. The app is extremely small so it is not difficult to see what is going on.
Thanks!
Hi, I have a weird issue. Using Flask-CORS as documented works if the Flask app is started with
flask run
. Since I want to have the app ready on other devices, I've added an entry inentry_points
in setup.py so thatThis allows me to run the web app by running
cashiersync
from the console. It does indeed start but the CORS headers are not present! If, instead, I doon the client machine, the headers are present again. The rest of the code is identical.
I'm a bit puzzled about this behaviour. Could you provide any ideas? I'd like to be able to have a console script for starting the server come packaged in pip package, if possible. The package is called
cashiersync
and is available on PyPi.The source code for the project is available at https://gitlab.com/alensiljak/cashier-sync. The app is extremely small so it is not difficult to see what is going on. Thanks!