Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
http://images inside https://site with proxying in nginx
module ApplicationHelper
def http_url(url)
return url if Rails.env.development?
# Instead of this
= image_tag ''
# We use this
= image_tag http_url('')
server {
# Other nginx server params
location /http_proxy {
proxy_pass $arg_url;
proxy_set_header host localhost;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.