PasswordPusher icon indicating copy to clipboard operation
PasswordPusher copied to clipboard

define a working subdirectory with RAILS_RELATIVE_URL_ROOT and config.ru modification ?

Open tibo59 opened this issue 3 years ago • 6 comments

Hello, In some cases (portal integration) we need to make Password work directly in subfolder rather than changing the web server configuration.

I tested this with success (I don't see any working problem) :

  • set environment variable ENV RAILS_RELATIVE_URL_ROOT=/pwpush (in Dockerfile)
  • and by modifying config.ru :

require ::File.expand_path('../config/environment', FILE) map ENV['RAILS_RELATIVE_URL_ROOT'] || '/' do run PasswordPusher::Application end

Does this change look correct to you? Do you think it could be integrated into passwordpusher (with an environment variable) ?

Regards, Thibaut

tibo59 avatar Mar 16 '22 15:03 tibo59

LGTM! Thanks for your contribution! 🎉

dmuhs avatar Nov 09 '22 17:11 dmuhs