New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config.default_asset_host_protocol is ignored? #2980
Comments
More description will help people to understand issue :-) |
sorry, the enter key has been pressed before finishing writing. |
I'm hitting the same bug too. |
■ First $ rails new demo <head>
<title>Demo</title>
<link href="/assets/application-8af74128f904600e41a6e39241464e03.css" media="screen" rel="stylesheet" type="text/css" />
<script src="/assets/application-a552e1db33b8be6a42eedf1261916f3c.js" type="text/javascript"></script>
...
</head> ■ Next edit config/environments/production.rb $ bundle exec rails s -e production <head>
<title>Demo</title>
<link href="http://assets.example.com/assets/application-8af74128f904600e41a6e39241464e03.css" media="screen" rel="stylesheet" type="text/css" />
<script src="http://assets.example.com/assets/application-a552e1db33b8be6a42eedf1261916f3c.js" type="text/javascript"></script>
...
</head> Above script tag's src attribute is bad. expected: <head>
<title>Demo</title>
<link href="http://assets.example.com/assets/application-8af74128f904600e41a6e39241464e03.css" media="screen" rel="stylesheet" type="text/css" />
<script src="//assets.example.com/assets/application-a552e1db33b8be6a42eedf1261916f3c.js" type="text/javascript"></script>
...
</head> I think that |
…blem and config missing problem.
cc @guilleiguaran |
This should be fixed in the commit above. Notice the proper configuration option is config.action_controller.default_asset_host_protocol and not config.default_asset_host_protocol. |
@spastorino |
@spastorino BTW gem 'rails', :git => 'git://github.com/rails/rails.git', :branch => '3-1-stable' |
@kennyj cool |
config.default_asset_host_protocol = :relative (actionpack/lib/sprockets/railtie.rb)
But, all assets(javascripts, stylesheets and images) used :request.
The text was updated successfully, but these errors were encountered: