{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/18961","repository_url":"https://api.github.com/repos/symfony/symfony","labels_url":"https://api.github.com/repos/symfony/symfony/issues/18961/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/18961/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/18961/events","html_url":"https://github.com/symfony/symfony/issues/18961","id":158306886,"number":18961,"title":"[TwigBundle] Bad assets url when behind a load balancer with TLS and env dev","user":{"login":"jcrombez","id":777666,"avatar_url":"https://avatars.githubusercontent.com/u/777666?v=3","gravatar_id":"","url":"https://api.github.com/users/jcrombez","html_url":"https://github.com/jcrombez","followers_url":"https://api.github.com/users/jcrombez/followers","following_url":"https://api.github.com/users/jcrombez/following{/other_user}","gists_url":"https://api.github.com/users/jcrombez/gists{/gist_id}","starred_url":"https://api.github.com/users/jcrombez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcrombez/subscriptions","organizations_url":"https://api.github.com/users/jcrombez/orgs","repos_url":"https://api.github.com/users/jcrombez/repos","events_url":"https://api.github.com/users/jcrombez/events{/privacy}","received_events_url":"https://api.github.com/users/jcrombez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-03T07:25:02Z","updated_at":"2016-06-03T07:37:43Z","closed_at":null,"body":"When an app is behind a load balancer, if the app servers use http and the load balancer handle use https, then the `absolute_url(asset(...))` in the TwigBundle layout generates http url (which is expected since the app is not aware you are using https.\r\n\r\nBut browsers don't like assets using http in a website using https, and prevent them from loading.\r\n\r\nhttps://github.com/symfony/symfony/commit/e40153354da1e014d86e5a688a4059f2c397fdb2\r\n\r\nhttps://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/TwigBundle/Resources/views/layout.html.twig#L7\r\n\r\nI realize my use case is not common since if i'm right it only occurs when using dev environnement, but why did we use an absolute_url function in this template in the first place ?"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/223511749","html_url":"https://github.com/symfony/symfony/issues/18961#issuecomment-223511749","issue_url":"https://api.github.com/repos/symfony/symfony/issues/18961","id":223511749,"user":{"login":"jcrombez","id":777666,"avatar_url":"https://avatars.githubusercontent.com/u/777666?v=3","gravatar_id":"","url":"https://api.github.com/users/jcrombez","html_url":"https://github.com/jcrombez","followers_url":"https://api.github.com/users/jcrombez/followers","following_url":"https://api.github.com/users/jcrombez/following{/other_user}","gists_url":"https://api.github.com/users/jcrombez/gists{/gist_id}","starred_url":"https://api.github.com/users/jcrombez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcrombez/subscriptions","organizations_url":"https://api.github.com/users/jcrombez/orgs","repos_url":"https://api.github.com/users/jcrombez/repos","events_url":"https://api.github.com/users/jcrombez/events{/privacy}","received_events_url":"https://api.github.com/users/jcrombez/received_events","type":"User","site_admin":false},"created_at":"2016-06-03T07:37:43Z","updated_at":"2016-06-03T07:37:43Z","body":"I should add that the load balancer adds the proper headers, `x-forwarded-proto` included."}}
{"actor":{"display_login":"jcrombez"}}