{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/28017","repository_url":"https://api.github.com/repos/symfony/symfony","labels_url":"https://api.github.com/repos/symfony/symfony/issues/28017/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/28017/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/28017/events","html_url":"https://github.com/symfony/symfony/issues/28017","id":343117188,"node_id":"MDU6SXNzdWUzNDMxMTcxODg=","number":28017,"title":"[RFC][Router] Add a global switch to always generate URLs with HTTPS","user":{"login":"javiereguiluz","id":73419,"node_id":"MDQ6VXNlcjczNDE5","avatar_url":"https://avatars3.githubusercontent.com/u/73419?v=4","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"labels":[{"id":83934034,"node_id":"MDU6TGFiZWw4MzkzNDAzNA==","url":"https://api.github.com/repos/symfony/symfony/labels/RFC","name":"RFC","color":"fbca04","default":false},{"id":111254,"node_id":"MDU6TGFiZWwxMTEyNTQ=","url":"https://api.github.com/repos/symfony/symfony/labels/Routing","name":"Routing","color":"DDDDDD","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-20T13:56:10Z","updated_at":"2018-07-20T13:57:34Z","closed_at":null,"author_association":"MEMBER","body":"**Description**  \r\nSomething I miss in Symfony apps is a simple way to always generate HTTPS URLs when using `path()`, `url()` or `$urlGenerator->generate()`, no matter which is the scheme of the current page. In addition to the added security, it's a simple way to force your visitors use HTTPS.\r\n\r\nToday I'm doing things like this in my services to implement this idea:\r\n\r\n```php\r\npublic function __construct(RouterInterface $router)\r\n{\r\n    $router->getContext()->setScheme('https');\r\n    $this->router = $router;\r\n}\r\n```\r\n\r\n**Example**  \r\nCould we add instead a global config under `framework.router` to always force HTTPS when generating routes? (Ideally when generating routes on the console too):\r\n\r\n```yaml\r\nframework:\r\n    router:\r\n        # ...\r\n        force_https: true\r\n```\r\n\r\nIf you agree, we'd need a great name for this option; `force_https` is just a quick proposal."},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/406608410","html_url":"https://github.com/symfony/symfony/issues/28017#issuecomment-406608410","issue_url":"https://api.github.com/repos/symfony/symfony/issues/28017","id":406608410,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjYwODQxMA==","user":{"login":"ciaranmcnulty","id":237866,"node_id":"MDQ6VXNlcjIzNzg2Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/237866?v=4","gravatar_id":"","url":"https://api.github.com/users/ciaranmcnulty","html_url":"https://github.com/ciaranmcnulty","followers_url":"https://api.github.com/users/ciaranmcnulty/followers","following_url":"https://api.github.com/users/ciaranmcnulty/following{/other_user}","gists_url":"https://api.github.com/users/ciaranmcnulty/gists{/gist_id}","starred_url":"https://api.github.com/users/ciaranmcnulty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciaranmcnulty/subscriptions","organizations_url":"https://api.github.com/users/ciaranmcnulty/orgs","repos_url":"https://api.github.com/users/ciaranmcnulty/repos","events_url":"https://api.github.com/users/ciaranmcnulty/events{/privacy}","received_events_url":"https://api.github.com/users/ciaranmcnulty/received_events","type":"User","site_admin":false},"created_at":"2018-07-20T13:57:34Z","updated_at":"2018-07-20T13:57:34Z","author_association":"CONTRIBUTOR","body":"A way to indicate HSTS might complement this "}}
{"actor":{"display_login":"ciaranmcnulty"}}