{"action":"created","issue":{"url":"https://api.github.com/repos/bolt/bolt/issues/3775","labels_url":"https://api.github.com/repos/bolt/bolt/issues/3775/labels{/name}","comments_url":"https://api.github.com/repos/bolt/bolt/issues/3775/comments","events_url":"https://api.github.com/repos/bolt/bolt/issues/3775/events","html_url":"https://github.com/bolt/bolt/issues/3775","id":94260851,"number":3775,"title":"[RFC] Canonical URL Generation","user":{"login":"sbani","id":3541652,"avatar_url":"https://avatars.githubusercontent.com/u/3541652?v=3","gravatar_id":"","url":"https://api.github.com/users/sbani","html_url":"https://github.com/sbani","followers_url":"https://api.github.com/users/sbani/followers","following_url":"https://api.github.com/users/sbani/following{/other_user}","gists_url":"https://api.github.com/users/sbani/gists{/gist_id}","starred_url":"https://api.github.com/users/sbani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbani/subscriptions","organizations_url":"https://api.github.com/users/sbani/orgs","repos_url":"https://api.github.com/users/sbani/repos","events_url":"https://api.github.com/users/sbani/events{/privacy}","received_events_url":"https://api.github.com/users/sbani/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bolt/bolt/labels/RFC","name":"RFC","color":"CC317C"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/bolt/bolt/milestones/19","html_url":"https://github.com/bolt/bolt/milestones/Bolt%202.3%20-%20Feature%20release","labels_url":"https://api.github.com/repos/bolt/bolt/milestones/19/labels","id":1041359,"number":19,"title":"Bolt 2.3 - Feature release","description":"","creator":{"login":"GawainLynch","id":1427081,"avatar_url":"https://avatars.githubusercontent.com/u/1427081?v=3","gravatar_id":"","url":"https://api.github.com/users/GawainLynch","html_url":"https://github.com/GawainLynch","followers_url":"https://api.github.com/users/GawainLynch/followers","following_url":"https://api.github.com/users/GawainLynch/following{/other_user}","gists_url":"https://api.github.com/users/GawainLynch/gists{/gist_id}","starred_url":"https://api.github.com/users/GawainLynch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GawainLynch/subscriptions","organizations_url":"https://api.github.com/users/GawainLynch/orgs","repos_url":"https://api.github.com/users/GawainLynch/repos","events_url":"https://api.github.com/users/GawainLynch/events{/privacy}","received_events_url":"https://api.github.com/users/GawainLynch/received_events","type":"User","site_admin":false},"open_issues":31,"closed_issues":19,"state":"open","created_at":"2015-03-27T09:00:44Z","updated_at":"2015-07-11T17:08:20Z","due_on":"2015-08-30T23:00:00Z","closed_at":null},"comments":2,"created_at":"2015-07-10T09:25:20Z","updated_at":"2015-07-12T07:02:36Z","closed_at":null,"body":"Hey,\r\n\r\nat the moment canonical URLs are generated with http:// as default.\r\nSee: https://github.com/bolt/bolt/blob/master/src/Configuration/ResourceManager.php#L329-L335\r\n\r\nMy problem:\r\nI have https URLs only and have to add the `canonical` option to the [config.yml](https://github.com/bolt/bolt/blob/master/app/config/config.yml.dist#L63).\r\nStarting without the option causes http URLs.\r\nBut I checked the `enforce_ssl` option which is for backend only.\r\n\r\nMy solutions:\r\n1) User has to use the `canonical` option\r\n2) We add a `enforce_ssl_frontend` or `enforce_ssl: ['backend', 'frontend']`\r\nI prefer the second one just because I think using the \"automatic\" URL generation for canonicals is better than the hardcoded. And it's a kind of double check for internal URLs.\r\n\r\nI updated the test #3774 to check the schema. So every change should already be tested there."},"comment":{"url":"https://api.github.com/repos/bolt/bolt/issues/comments/120697305","html_url":"https://github.com/bolt/bolt/issues/3775#issuecomment-120697305","issue_url":"https://api.github.com/repos/bolt/bolt/issues/3775","id":120697305,"user":{"login":"bobdenotter","id":1833361,"avatar_url":"https://avatars.githubusercontent.com/u/1833361?v=3","gravatar_id":"","url":"https://api.github.com/users/bobdenotter","html_url":"https://github.com/bobdenotter","followers_url":"https://api.github.com/users/bobdenotter/followers","following_url":"https://api.github.com/users/bobdenotter/following{/other_user}","gists_url":"https://api.github.com/users/bobdenotter/gists{/gist_id}","starred_url":"https://api.github.com/users/bobdenotter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobdenotter/subscriptions","organizations_url":"https://api.github.com/users/bobdenotter/orgs","repos_url":"https://api.github.com/users/bobdenotter/repos","events_url":"https://api.github.com/users/bobdenotter/events{/privacy}","received_events_url":"https://api.github.com/users/bobdenotter/received_events","type":"User","site_admin":false},"created_at":"2015-07-12T07:02:36Z","updated_at":"2015-07-12T07:02:36Z","body":"I'd propose a different solution: \r\n\r\n - Let's leave the `canonical: ` setting as is\r\n - Change the behaviour of the automatic canonical generator: If the page is requested over HTTPS, make sure the generated canonical starts with `http://` too. \r\n\r\n"}}