Commit Graph

1282 Commits

Author SHA1 Message Date
ddff08392a Make upstart script more fault tolerant and easier to debug (#824)
* Make Upstart script more fault tolerant and easier to debug

* update readme
2016-06-06 07:32:27 -06:00
e1a6b60736 Merge pull request #861 from marc-gr/upstream
Add upstream directive
2016-06-03 17:50:33 -06:00
9b5ad487d7 Add several upstreams test case 2016-06-04 01:07:53 +02:00
d291b76721 Gofmt fixes 2016-06-03 22:48:24 +02:00
881da313dd Add tests for upstream directive 2016-06-03 21:36:15 +02:00
1bdbf9d6ba Add parseUpstream method 2016-06-03 21:36:15 +02:00
2536ea74d9 Merge pull request #859 from jupiter/fix/issue-643
Fix for cleaned URL.Path
2016-06-02 16:43:34 -06:00
9acfec5418 Fix cleaned URL path in proxy 2016-06-02 22:08:10 +01:00
a0e6eb3ba9 Merge pull request #855 from abiosoft/proxy-host-patch
Fix for #854
2016-05-29 08:11:27 +01:00
6e6d9e7e9e Fix for #854 2016-05-29 07:55:40 +01:00
238250e7e6 Recommend forum in issue template 2016-05-27 10:16:11 -06:00
324ec15890 Link to forum 2016-05-27 09:15:06 -06:00
c64361a753 Use latest Go version (1.6.2) for CI builds 2016-05-24 18:37:44 -06:00
6d9dcb1729 Merge pull request #846 from nesl247/fix-845
Strip [] from IPv6 addresses for FastCGI.
2016-05-24 13:56:55 -06:00
da97ac7c63 Strip [] from IPv6 addresses for FastCGI.
Fixes #845.
2016-05-24 15:19:50 -04:00
374d0a3f09 Merge pull request #840 from mholt/more-systemd
systemd, README: Edit to account for the recent spike in reports
2016-05-21 14:44:58 -06:00
bee9c50a71 systemd, README: needs to be version 229 or later, and how to display logs
We have had three operators within a few days which ran into the same cause
and had not been able to figure out what went wrong.

addresses #833, #822
2016-05-21 00:54:44 +02:00
bac29cc20a Change image http -> https 2016-05-15 08:26:20 -04:00
e6b1028da9 Merge pull request #823 from ponychicken/patch-1
fix typo
2016-05-14 17:20:19 -04:00
4c62397ff8 fix typo 2016-05-14 16:39:00 +02:00
e516aebc08 Merge pull request #817 from mholt/systemd-service-file
Provides some more guidelines to operators on how to avoid running Caddy as root.

Introduces an user www-data, which really is a placeholder. Such an user with the same UID/GID combination is created on the most popular Linux distribution. I trust any operator can spot the difference to his/her distro and adjust the unit file.

User nobody is not used here to avoid two easy pitfalls: Such an user should not be able to access private keys (for TLS), and should not write private keys (we would do that with Letsencrypt).
2016-05-12 15:15:32 +02:00
da8ae9e511 systemd: Run caddy with even less privileges and more confined
The exemplary unit file for systemd is intentionally redundant at times, for
example dropping privileges which an unprivileged user "www-data" did not have
in the first place: To aid as fallback in case the file gets copied and an
operator setting UID to 0 (which reportedly happened in the past).
2016-05-12 15:11:43 +02:00
d377c79a5d systemd, README: Edit for clarity 2016-05-12 15:08:06 +02:00
389a6eb344 Merge pull request #811 from mholt/fix-browse-2
browse: Decorate external links with: noopener noreferrer
2016-05-07 20:19:22 +02:00
85d793ce88 browse: Decorate external links with: noopener noreferrer
Setting these on external links prefents the target from manipulating this
page by "window.opener" with some widely deployed browsers.
2016-05-07 20:06:55 +02:00
1f29c52151 Merge pull request #807 from mholt/graceful-inproc-restart
Restart gracefully with in-process restart
2016-05-07 08:58:18 -06:00
9705f34970 Restart gracefully for in-process restart 2016-05-07 13:39:47 +08:00
db21b0319d Merge pull request #804 from kennwhite/kennwhite-readme-patch
Adding note on the rationale for Go 1.6
2016-05-05 08:29:14 -06:00
25b934824f Adding note on the rationale for Go 1.6 2016-05-05 10:18:00 -04:00
c23c6d9cb4 Merge pull request #762 from weingart/md_changes
Markdown changes
2016-05-04 23:29:48 -06:00
9697c47e21 Merge branch 'master' into md_changes 2016-05-03 19:14:35 -07:00
39030d9e1b browse: delete duplicate </a>-closing tags in default template 2016-05-03 20:10:38 +02:00
61c7a51bfa Errant commented import. 2016-05-01 16:50:25 -07:00
45e783c3f9 Fix headers and unexport plaintext renderer. 2016-05-01 16:45:24 -07:00
2bccc1466e Fixup and address most of the feedback. 2016-04-30 20:09:25 -07:00
a3af232dc5 Use http.MethodGet instead of "GET". 2016-04-30 17:06:46 -07:00
04089c533b Return errors. 2016-04-30 17:04:44 -07:00
e0bc426050 Initial re-add of markdown summary functionality. 2016-04-30 17:01:31 -07:00
bd2a33dd14 Europeans know time. :) 2016-04-30 14:21:30 -07:00
20dfaab703 Nuke unused function. 2016-04-30 14:16:19 -07:00
249c9a17f5 Make default template more readable/clean. 2016-04-30 14:07:42 -07:00
c431a07af5 Merge branch 'master' into md_changes 2016-04-30 13:33:47 -07:00
e2234497b7 proxy: Add, remove, or replace upstream and downstream headers (closes #666) (PR #788)
* Overwrite proxy headers based on directive

Headers of the request sent by the proxy upstream can now be modified in
the following way:

Prefix header with `+`: Header will be added if it doesn't exist
otherwise, the values will be merge
Prefix header with `-': Header will be removed
No prefix: Header will be replaced with given value

* Add missing formating directive reported by go vet

* Overwrite up/down stream proxy headers

Add Up/DownStreamHeaders to UpstreamHost

Split `proxy_header` option in `proxy` directive into `header_upstream`
and `header_downstream`. By splitting into two, it makes it clear in
what direction the given headers must be applied.

`proxy_header` can still be used (to maintain backward compatability)
but its assumed to be `header_upstream`

Response headers received by the reverse proxy from the upstream host
are updated according the `header_downstream` rules.
The update occurs through a func given to the reverse proxy, which is
applied once a response is received.

Headers (for upstream and downstream) can now be modified in
the following way:

Prefix header with `+`: Header will be added if it doesn't exist
otherwise, the values will be merge
Prefix header with `-': Header will be removed
No prefix: Header will be replaced with given value

Updated branch with changes from master

* minor refactor to make intent clearer

* Make Up/Down stream headers naming consistent

* Fix error descriptions to be more clear

* Fix lint issue
2016-04-30 13:41:30 -06:00
96425f0f40 Fix vet failing on Go tip 2016-04-30 11:13:04 -06:00
d05dac8d2e Little bit of housekeeping 2016-04-27 12:52:00 -06:00
81e26970a3 proxy: Move handling of headers around to prevent memory usage spikes (#784)
* Move handling of headers around to prevent memory use spikes

While debugging #782, I noticed that using http2 and max_fails=0,
X-Forwarded-For grew infinitely when an upstream request failed after
refreshing the test page. This change ensures that headers are only
set once per request rather than appending in a time-terminated loop.

* Refactor some code into its own function
2016-04-27 12:50:18 -06:00
f561dc0bc1 browse: Serve a datetime format the IE11 and Firefox understand
Another new safeguard is that we check whether the datetime has been read
correctly. If not then the listing will not be localized.

closes #793
2016-04-27 19:24:42 +02:00
21382702d2 Update readme version, 0.8.3 v0.8.3 2016-04-26 09:28:05 -06:00
e97649493b Update change log; version 0.8.3 2016-04-26 08:36:59 -06:00
19d6f666aa Fix build script with default git repo path (cwd) 2016-04-25 22:10:16 -06:00