config/config.erb, and then in my Procfile changed my web line to To see what the default template is, and make your own version. Ls $(passenger-config about resourcesdir)/templates/standalone/config.erb Now as long as you ensure your Passenger gem is >= 4.0.39, you can run Recently, as in last month (March 17), Passenger added support for providing a custom template for Nginx in response to this very issue.
![textmate hidden files textmate hidden files](https://i.stack.imgur.com/euW7F.png)
The issue was that the Nginx template provided by Passenger containing this: This can be fixed by moving the resource to the same domain or enabling CORS. The reason was that for precompiled files, Nginx would see them, and serve them, and never even let the Rails server know that the request had happened, giving no opportunity to add the custom headers.Ĭross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at. Some people will point out that you can set default headers in Rails 4, but running curl -I was showing none of those headers, and just some information about Nginx. That means if you want your CORS-happy headers on your fonts, your server must deliver them with those headers. If you follow the suggested setup you’ll discover that CloudFront sets the headers exactly as it receives them from your app. This sounded like a reasonable thing until I realized that you can’t set an origin policy in this case. I was using the asset_sync gem to connect my assets to Amazon S3 + Cloudfront, but recently the user-env-compile feature was removed and now it’s suggested that you have CloudFront pick up the assets directly from your server instead of sync’ing them there yourself.
![textmate hidden files textmate hidden files](https://1agenstvo.ru/800/600/https/forum.academy/uploads/default/original/2X/4/44ddc747a7512885c850f1bd67af08393750f0fe.png)
I host Farmstand on Heroku, and I prefer to use Passenger to run it.