How do I deploy Dash to Elastic Beanstalk with Basic Authentication


#1

Hi,
I have followed the documentation on setting up authentication for Dash and works correctly locally. However when I tried to deploy the Dash app to AWS by Elastic Beanstalk, it won’t accept the username and password pair. I have searched on line and it seems to be related to the fact that AWS removes the Authentication Header from the HTTP request.

People suggests to include a file named python.config

container_commands:
03wsgipass:
command: ‘echo “WSGIPassAuthorization On” >> …/wsgi.conf’

to .elasticbeanstalk folder.

I have tried that without much luck.

What should I do ?


#2

I have this exact same problem, have you found a solution ?


#3

I struggled with this for hours. It looks like AWS changed the filename requirements over time without any documentation that I could find.

It was finally fixed when I changed the filename to wsgi_custom.config, and saved it in .ebextensions, not .elasticbeanstalk, although I have it in both places for good measure.

It seems like it has to be .config, not .conf.

Here’s the content of my .ebextensions/wsgi_custom.config" file:

files:
    "/etc/httpd/conf.d/wsgi_custom.conf":
    mode: "000644"
    owner: root
    group: root
    content: |
    WSGIPassAuthorization On

#4

Worked like a charm! Thank you very much!