Created
March 11, 2017 17:30
-
-
Save xbklairith/e809ff7e4f91748f203fb88f29e9f2e7 to your computer and use it in GitHub Desktop.
get base url from sinatra with nginx passenger app passenger_base_uri
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#get base url from sinatra with nginx passenger app passenger_base_uri | |
base_url = "#{request.env['rack.url_scheme']}://#{request.env['HTTP_HOST']}#{request.env['SCRIPT_NAME']}"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment