HTTP Basic Authentication
stefsiekman
PROOP

a year ago

Hi! I have a project that I would like to 'protect' with HTTP basic authentication. Is there a way to do this on Railway? I tried creating a Docker image that has auth setup with NGINX, but this results in a 'Application failed to respond' error (see https://flight-tools-production.up.railway.app/). The docker image runs fine locally.

I'm also open to try another method to limit user access to the site. My goal is more to make the site invisible to the casual viewer, not so much to thoroughly protect it, hence my choice for HTTP basic authentication.

Thanks in advance!

Solved

3 Replies

brody
EMPLOYEE

a year ago

Hello!

Basic Auth isn't something we provide on our side, it would be something your application has to handle, there are various basic auth middleware for almost every web framework, what framework are you using?


stefsiekman
PROOP

a year ago

Thank you for the quick reply! I managed to resolve the issue!

I was trying to implement it in a Dockerfile (basically just hosting static files with NGINX). It didn't work the first time, and since I got the 'Application failed to respond' message, I concluded that basic auth was just something that Railway didn't support. However, after your reply I tried again, and it worked fine, so it must have been something else.

Thanks again for the help.


brody
EMPLOYEE

a year ago

Awesome, happy to hear you got it solved!


Status changed to Solved brody 11 months ago


Loading...