Questions tagged [flask]
144 questions
2
votes
1 answer
Why is Nginx truncating the JSON streaming response?
Our stack is Client(Browser) <-> Nginx Reverse Proxy <-> Webserver(Flask+Gunicorn) <-> Golang gRPC server
The problem is when the client makes a call to the /realtimedata endpoint, Flask then opens the gRPC connection and starts receiving data via a…

Paul Côté
- 21
- 2
2
votes
1 answer
source venv/bin/activate isn't returning anything on CentOS
I'm trying to deploy a Python Flask app (for API endpoint) on CentOS for work, but every online guide I've followed isn't working for me!
python3 -m venv APIenv
The env was created successfully, but then trying to activate it:
source…

KiDo
- 145
- 9
2
votes
2 answers
Why is Apache2 not finding my WSGI app?
In my previous question, I asked how to make mod_wsgi use a specific Python version. Following the answer from that question, I created a Python 3.9 virtual environment and made WSGI use it. However, now my Flask app is not running at all - I just…

ThatCoolCoder
- 193
- 1
- 7
2
votes
0 answers
Nginx + uWSGI + Flask Connection Reset
Problem
I have a Flask app deployed using Elastic Beanstalk's "Single Container Docker" platform (latest revision 3.2.5 at the time of writing), with an "Application Load Balancer" in front of it. I had this same Flask app deployed in EB with the…

jlucier
- 121
- 4
2
votes
0 answers
Timeout when reading response headers from daemon process. Python, Flask, Apache
I have a problem with my mod_wsgi configuration. Sometimes, I think when there is a lot of traffic on my website, the page breaks and says "Resource temporarily unavailable..."
Apache logs:
Timeout when reading response headers from daemon…

Tony
- 21
- 2
2
votes
0 answers
Cannot connect to Flask server via public IP, only private IP
I have a simple Flask server that echos requests it gets to the terminal. Requests I send it via the device's public IP address do not register.
The flask server is started correctly on all interfaces with .run(host="0.0.0.0", port=5000,…

GiovanH
- 121
- 1
- 3
1
vote
0 answers
Should I avoid CORS when building an SPA with backend API hosted on the same server?
I've stumbled upon this question and had the thought that my application should not require CORS, since it is hosted on the same server (a raspberry pi).
However, since CORS is a security "feature" I'm also not sure if avoiding it would even be good…

HackXIt
- 21
- 1
- 8
1
vote
0 answers
Flask app to upload an image file via Apache 2 not working
Running Apache/2.4.41 on Fedora 30 and python3-mod_wsgi-4.6.4-3.fc30.x86_64. And doing a test with: mod_wsgi-express start-server /var/www/flask/upload_pictures.wsgi --user myuser works mostly fine just uses Python 2.7 and some warnings. Browsing…

RobbieTheK
- 400
- 6
- 18
1
vote
1 answer
How to protect against session hijacking in Flask
So, i'm developing a Flask web-app and i wanted to test its security since i've implemented the following:
SSL Cert with cookies being securely transmitted
CSRF token to avoid CSRF attacks
Cookie validation, to avoid cookie modification
Cookie are…

Cesar Cuevas
- 23
- 4
1
vote
1 answer
Import Error on deploying a flask app on apache
I am trying to deploy a flask app on a VPS using WSGI. I am not using a virtualenv, and pandas is installed on the system:
Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for…

daltonfury42
- 179
- 2
- 10
1
vote
1 answer
How to deploy a WSGI/Python app behind Nginx on Windows?
Coming from the Linux environment, I'll try to be as accurate as possible with Windows concepts I clearly don't master.
Here's my current situation:
I have a functional Windows (10 pro x64) Nginx setup
It's working well on https, using the…

Glandalf313
- 13
- 1
- 2
- 8
1
vote
0 answers
mail form api security
I am working on a static site generated with hugo and want to embed an email form without using external (commercial or possibly untrustworthy) services like formspree.io (too much of a headache in european union with all the regulations).
For that…

mgrey_77
- 11
- 1
1
vote
1 answer
uwsgi with flask and python3 conda environment is loading python2 instead
I'm trying to run a python3 flask web application with uwsgi.
If I run /usr/bin/uwsgi --ini /var/www/QCQuan/uwsgi_config.ini --logto /tmp/log then uwsgi fails and the log file shows:
Python version: 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC…

PDiracDelta
- 181
- 3
- 8
1
vote
0 answers
Getting Mod_WSGI Error: Deploying Flask Application to ElasticBeanstlk
I am current trying to deploy a Flask Application (an API Application) onto Elastic Beanstalk. But I am getting mod_wsgi error.
Here is the error message:
[Fri Jun 01 06:10:49.314023 2018] [:warn] [pid 2801] mod_wsgi:
Compiled for…

cruise_lab
- 111
- 1
1
vote
2 answers
NETSH - how to bind SSL Certificate to port and pass traffic to application?
On Windows Server 2016
I have a simple python web server (in flask). It works great, and listens on port 80 (or whatever I configure it to listen on).
I need to serve it over SSL.
I have a good certificate, and imported it into the Computer/personal…

Jonesome Reinstate Monica
- 5,445
- 10
- 56
- 82