GitHub PullRequestReviewCommentEvent at 2014-04-08 17:36:36
Repository: trapperkeeper-webserver-jetty9
Actor: KevinCorcoran
Payload: {"comment":{"url":"https://api.github.com/repos/puppetlabs/trapperkeeper-webserver-jetty9/pulls/comments/11401607","id":11401607,"diff_hunk":"@@ -263,6 +263,62 @@ to `https://localhost:10000/bar`.  We'll proxy using HTTPS even if the original\n request was HTTP, and we'll use the three pem files in `/tmp` to configure the\n HTTPS client, regardless of the SSL configuration of the main web server.\n \n+#### `override-webserver-settings!`\n+\n+`override-webserver-settings!` is used to override settings in the `webserver`\n+section of the webserver service's config file.  This function will accept one\n+argument, `[overrides]`.  `overrides` is a map which should contain a\n+key/value pair for each setting to be overridden.  The name of the setting to\n+override should be expressed as a Clojure keyword.  For any setting expressed in\n+the service config which is not overridden, the setting value from the config\n+will be used.\n+\n+For example, the webserver config may contain:\n+\n+```INI\n+[webserver]\n+ssl-host    = 0.0.0.0\n+ssl-port    = 9001\n+ssl-cert    = mycert.pem\n+ssl-key     = mykey.pem\n+ssl-ca-cert = myca.pem\n+```\n+\n+Overrides may be supplied from the service using code like the following:\n+\n+```clj\n+(defservice foo-service\n+  [[:WebserverService override-webserver-settings!]]\n+  (init [this context]\n+    (override-webserver-settings!\n+      {:ssl-port    9002\n+       :ssl-cert    \"myoverriddencert.pem\"\n+       :ssl-key     \"myoverriddenkey.pem\"})\n+    context))\n+```\n+\n+For this example, the effective settings used during webserver startup would be:\n+\n+```clj\n+{:ssl-host    \"0.0.0.0\"\n+ :ssl-port    9002\n+ :ssl-cert    \"myoverriddencert.pem\"\n+ :ssl-key     \"myoverriddenkey.pem\"\n+ :ssl-ca-cert \"myca.pem\"}\n+```\n+\n+The overridden webserver settings will be considered only at the point the\n+webserver is being started -- during the start lifecycle phase of the\n+webserver service.  For this reason, a call to this function must be made\n+during a service's init lifecycle phase in order for the overridden\n+settings to be considered.\n+\n+Only one call from a service may be made to this function during application","path":"README.md","position":54,"original_position":54,"commit_id":"589090761340b487dea965086e8b403a6c6b9748","original_commit_id":"589090761340b487dea965086e8b403a6c6b9748","user":{"login":"KevinCorcoran","id":2945462,"avatar_url":"https://avatars.githubusercontent.com/u/2945462?","gravatar_id":"dfc2c8771d3a9c5607e45783e3efeabc","url":"https://api.github.com/users/KevinCorcoran","html_url":"https://github.com/KevinCorcoran","followers_url":"https://api.github.com/users/KevinCorcoran/followers","following_url":"https://api.github.com/users/KevinCorcoran/following{/other_user}","gists_url":"https://api.github.com/users/KevinCorcoran/gists{/gist_id}","starred_url":"https://api.github.com/users/KevinCorcoran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KevinCorcoran/subscriptions","organizations_url":"https://api.github.com/users/KevinCorcoran/orgs","repos_url":"https://api.github.com/users/KevinCorcoran/repos","events_url":"https://api.github.com/users/KevinCorcoran/events{/privacy}","received_events_url":"https://api.github.com/users/KevinCorcoran/received_events","type":"User","site_admin":false},"body":"I think this is a similar suggestion to what we've already discussed - and decided that it's good enough like this for now, although we may choose to improve it later.","created_at":"2014-04-08T17:36:36Z","updated_at":"2014-04-08T17:36:36Z","html_url":"https://github.com/puppetlabs/trapperkeeper-webserver-jetty9/pull/16#discussion_r11401607","pull_request_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-webserver-jetty9/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/trapperkeeper-webserver-jetty9/pulls/comments/11401607"},"html":{"href":"https://github.com/puppetlabs/trapperkeeper-webserver-jetty9/pull/16#discussion_r11401607"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/trapperkeeper-webserver-jetty9/pulls/16"}}}}