{"action":"created","issue":{"url":"https://api.github.com/repos/mholt/caddy/issues/1830","repository_url":"https://api.github.com/repos/mholt/caddy","labels_url":"https://api.github.com/repos/mholt/caddy/issues/1830/labels{/name}","comments_url":"https://api.github.com/repos/mholt/caddy/issues/1830/comments","events_url":"https://api.github.com/repos/mholt/caddy/issues/1830/events","html_url":"https://github.com/mholt/caddy/issues/1830","id":250643869,"number":1830,"title":"Latency placeholders do not work with any directive","user":{"login":"watermelonjuice","id":5452111,"avatar_url":"https://avatars0.githubusercontent.com/u/5452111?v=4","gravatar_id":"","url":"https://api.github.com/users/watermelonjuice","html_url":"https://github.com/watermelonjuice","followers_url":"https://api.github.com/users/watermelonjuice/followers","following_url":"https://api.github.com/users/watermelonjuice/following{/other_user}","gists_url":"https://api.github.com/users/watermelonjuice/gists{/gist_id}","starred_url":"https://api.github.com/users/watermelonjuice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/watermelonjuice/subscriptions","organizations_url":"https://api.github.com/users/watermelonjuice/orgs","repos_url":"https://api.github.com/users/watermelonjuice/repos","events_url":"https://api.github.com/users/watermelonjuice/events{/privacy}","received_events_url":"https://api.github.com/users/watermelonjuice/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-08-16T14:18:25Z","updated_at":"2017-08-16T16:24:01Z","closed_at":"2017-08-16T16:24:01Z","body":"### 1. What version of Caddy are you using (`caddy -version`)?\r\n0.10.6\r\n\r\n### 2. What are you trying to do?\r\nAdd server latency to http headers\r\n\r\n### 3. What is your entire Caddyfile?\r\n```text\r\nexample.com {\r\n        root /path/to/public/\r\n        tls admin@example.com\r\n        fastcgi / unix:/run/php-fpm/php-fpm.sock php\r\n        rewrite {\r\n                to {path} {path}/ /index.php?{query}\r\n        }\r\n        gzip\r\n        expires {\r\n                match .(ico|pdf|jpg|jpeg|png|gif|svg|css|js|ttf|eot|woff)$ 1y\r\n        }\r\n        errors /var/log/caddy/errors.log {\r\n                rotate_size 50\r\n                rotate_age  90\r\n                rotate_keep 20\r\n        }\r\n        push\r\n        header / +x-server-latency {latency_ms}\r\n}\r\n```\r\n\r\n### 4. How did you run Caddy (give the full command and describe the execution environment)?\r\nsystemd\r\n\r\n### 5. Please paste any relevant HTTP request(s) here.\r\ncurl --head\r\n\r\n\r\n### 6. What did you expect to see?\r\ncache-control: no-cache, private\r\ncontent-type: text/html; charset=UTF-8\r\ndate: Wed, 16 Aug 2017 14:09:17 GMT\r\nserver: Caddy\r\nx-powered-by: PHP/7.1.8\r\nx-server-latency: 100ms\r\n\r\n### 7. What did you see instead (give full error messages and/or log)?\r\ncache-control: no-cache, private\r\ncontent-type: text/html; charset=UTF-8\r\ndate: Wed, 16 Aug 2017 14:09:17 GMT\r\nserver: Caddy\r\nx-powered-by: PHP/7.1.8\r\nx-server-latency: \r\n\r\n\r\n### 8. How can someone who is starting from scratch reproduce the bug as minimally as possible?\r\nAs per https://caddyserver.com/docs/fastcgi and https://caddyserver.com/docs/placeholders it is not clear which directives support the latency placeholders."},"comment":{"url":"https://api.github.com/repos/mholt/caddy/issues/comments/322825496","html_url":"https://github.com/mholt/caddy/issues/1830#issuecomment-322825496","issue_url":"https://api.github.com/repos/mholt/caddy/issues/1830","id":322825496,"user":{"login":"mholt","id":1128849,"avatar_url":"https://avatars2.githubusercontent.com/u/1128849?v=4","gravatar_id":"","url":"https://api.github.com/users/mholt","html_url":"https://github.com/mholt","followers_url":"https://api.github.com/users/mholt/followers","following_url":"https://api.github.com/users/mholt/following{/other_user}","gists_url":"https://api.github.com/users/mholt/gists{/gist_id}","starred_url":"https://api.github.com/users/mholt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mholt/subscriptions","organizations_url":"https://api.github.com/users/mholt/orgs","repos_url":"https://api.github.com/users/mholt/repos","events_url":"https://api.github.com/users/mholt/events{/privacy}","received_events_url":"https://api.github.com/users/mholt/received_events","type":"User","site_admin":false},"created_at":"2017-08-16T16:24:01Z","updated_at":"2017-08-16T16:24:01Z","body":"The latency placeholders are *response* placeholders, and directives which support them do mention that in the docs (for example the [`log` directive](https://caddyserver.com/docs/log) supports response placeholders) - the header directive does not."}}
{"actor":{"display_login":"mholt"}}