Commit Graph

1385 Commits

Author SHA1 Message Date
Matthew Holt
b35d19d78e Set protocol version properly (fixes #943) 2016-07-19 11:48:44 -06:00
Matt Holt
cf4e0c9c9c Merge pull request #940 from mmlkrx/update-readme-contributing-section
Update readme contributing section
2016-07-19 07:50:31 -06:00
Matthias Loker
ac97cf426f Update readme contributing section 2016-07-19 15:41:54 +02:00
Matthew Holt
f28af63732
Version 0.9 2016-07-18 21:50:45 -06:00
Matthew Holt
38c2463416
Fix ACME asset migration when renaming folders 2016-07-18 21:50:27 -06:00
Matthew Holt
df018ea64a
Properly handle path-only addresses (also fix godoc typos) 2016-07-18 18:45:20 -06:00
Matthew Holt
4ff46ad447
Refactor Server into TCPServer and UDPServer 2016-07-18 16:28:26 -06:00
Matthew Holt
59c6513b31
Clarify some godoc 2016-07-18 16:21:19 -06:00
Matthew Holt
aede4ccbce Small changes; mostly comments 2016-07-18 14:32:28 -06:00
Miek Gieben
9315738dab Allow for UDP servers (#935)
* Allow for UDP servers

Extend the Server interface with ServePacket and ListenPacket - this is
in the same vein as the net package.

Plumb the packetconn through the start and restart phases.

Rename RestartPair to RestartTriple as it now also contains a Packet.
Not that these can now be nil, so we need to check for that when
restarting.

* Update the documentation
2016-07-18 14:24:09 -06:00
Matthew Holt
502a8979a8 Propagate DNS provider plugins to caddy package so -plugins shows them 2016-07-15 21:29:06 -06:00
Pedro Nasser
d6110f8e9e Merge pull request #932 from pedronasser/fix-import
fix: import should always be relative to current file directory
2016-07-14 23:30:28 -03:00
Pedro Nasser
d7698ecf13 fix: import should always be relative to current file directory 2016-07-14 21:48:56 -03:00
Pedro Nasser
9ea0591951 Merge pull request #931 from pedronasser/master
fix transparent host header #916
2016-07-14 21:46:24 -03:00
Pedro Nasser
ffafb2eca8 Merge branch 'master' of github.com:pedronasser/caddy 2016-07-14 18:17:05 -03:00
Pedro Nasser
6bb1e0c674 improve transparent mode 2016-07-14 18:16:58 -03:00
Pedro Nasser
6f37e9d31b Merge branch 'master' into master 2016-07-14 15:48:46 -03:00
Pedro Nasser
b58872925a fixed transparent host and added test case 2016-07-14 15:43:06 -03:00
Pedro Nasser
8d7136fc06 fix transparent host header #916 2016-07-14 15:30:00 -03:00
Pedro Nasser
2125ae5f99 import should get absolute path before glob (#929)
* import should get absolute path before glob

* fix test: import should get absolute path before glob

* try to fix test on windows

* use complete path as the dispenser filename

* fix caddyfile test
2016-07-13 10:58:42 -06:00
Matthew Holt
3fd3feeffe
Add Ext action to template context (closes #844) 2016-07-11 08:37:19 -06:00
Matthew Holt
62622eb853 proxy: 'transparent' also sets X-Forwarded-For (closes #924) 2016-07-09 17:33:40 -06:00
Abiola Ibrahim
87c389f73d Proposal: Middleware Config (#908)
* Prototype middleware Config

* Refactors

* Minor refactors
2016-07-08 18:12:52 -06:00
Abiola Ibrahim
cf03c9a6c8 Merge pull request #928 from abiosoft/master
discard remaining args for if block in redir.
2016-07-08 19:52:19 +01:00
Abiola Ibrahim
48abb41135 discard remaining args in if block 2016-07-08 19:39:31 +01:00
Pedro Nasser
7eb4bb8e1c Merge pull request #927 from pedronasser/master
fix rewrite if problem (skip remaining args)
2016-07-08 14:52:45 -03:00
Pedro Nasser
39e55072d7 fix rewrite if problem (skip remaining args) 2016-07-08 14:11:15 -03:00
Chad Retz
88a2811e2a Pluggable TLS Storage (#913)
* Initial concept for pluggable storage (sans tests and docs)

* Add TLS storage docs, test harness, and minor clean up from code review

* Fix issue with caddymain's temporary moveStorage

* Formatting improvement on struct array literal by removing struct name

* Pluggable storage changes:

* Change storage interface to persist all site or user data in one call
* Add lock/unlock calls for renewal and cert obtaining

* Key fields on composite literals
2016-07-08 07:32:31 -06:00
Matthew Holt
065eeb42c3 Move rewrite and ext middlewares to before gzip (fixes #914) 2016-07-06 00:04:53 -06:00
Matt Holt
d4b10b69a7 Merge pull request #920 from ianwalter/master
Changing refs from /usr/bin to /usr/local/bin
2016-07-05 23:32:01 -06:00
Matthew Holt
f77264b776
Improve basicauth password comparison
Thanks to @jaredfolkins for the feedback
2016-07-05 12:49:25 -06:00
Ian Walter
ad2ed5b0ae Changing refs from /usr/bin to /usr/local/bin 2016-07-05 13:39:04 -04:00
Matthew Holt
fdb6d64f9d
Add locale plugin directive, update changelog 2016-07-02 18:07:24 -06:00
Matthew Holt
227664336e Misc. changes: {hostonly} placeholder, self_signed port fix 2016-07-02 14:11:17 -06:00
Matt Holt
32329a473d Merge pull request #909 from evermax/master
Test that the host header forwarding on proxy
2016-06-29 18:53:15 -06:00
Maxime
e5bf8cab24 Test that the host header forwarding on the proxy middleware 2016-06-29 16:52:31 -07:00
Matt Holt
6db4771aa8 Merge pull request #907 from abiosoft/fastcgi_env_placeholder
Support for placeholders in fastcgi env vars.
2016-06-29 07:09:37 -06:00
Abiola Ibrahim
b1cd0bfeff Support for placeholders in fastcgi env vars. 2016-06-29 13:41:52 +01:00
Matthew Holt
2e84fe4504
Replace auto-HTTPS info message and move a method to proper file 2016-06-28 23:01:06 -06:00
Matthew Holt
d2be213e10
Import paths now relative to Caddyfile (closes #867)
This is inconsistent with the other directives, but import is a special
case and frankly the behavior of import shouldn't change depending
on the directory from which you run caddy. Breaking change but I think
it's for the better, and best to do it now before 1.0.
2016-06-28 22:39:29 -06:00
Matthew Holt
a1bc94e409
Working on a fix for proxy related to setting Host header (cf. #874)
Also see
https://forum.caddyserver.com/t/caddy-0-9-beta-version-available-updated-beta-2/146/29?u=matt
which has another account of strange proxy behavior; I think this
resolves that.
2016-06-28 18:40:07 -06:00
Matthew Holt
80dd95a495
Change outreq.Host instead of r.Host (possibly related to #874)
Also a few little formatting changes and comments.
2016-06-28 18:19:35 -06:00
Matthew Holt
5a45719227
Don't change port when TLS is managed manually 2016-06-28 18:16:10 -06:00
Viacheslav Biriukov
345ece3850 add multi proxy supprot based on urls 2016-06-28 16:35:35 -06:00
Matthew Holt
2b44a7d052
Link to instructions if storage migration fails (#902) 2016-06-27 15:13:01 -06:00
Matthew Holt
58085edc16 Don't treat localhost specially when assigning bind address
If we listen on 127.0.0.1:80 for `localhost` but :80 for everything else,
then a hostname in the hosts file that resolves to 127.0.0.1 will be
served on :80 (unless the bind directive is used) but the OS will use
the socket listening at 127.0.0.1:80, thus giving a "No such site" error
even though the site is there, but it's on the other listener at :80.

Two ways to fix this: 1) Leave as-is and require the user to set "bind
127.0.0.1" in their Caddyfile for all sites that are resolved in the
hosts file, or 2) Take out this special case and let localhost sites
listen on :80 (unless the user changes that with the bind directive, of
course). Having localhost bind to any interface is a little annoying
(unsettling?) but probably best in the long run.

https://forum.caddyserver.com/t/wildcard-virtual-domains-with-wildcard-roots/221/9?u=matt
2016-06-27 13:14:28 -06:00
Matt Holt
6f05faa670 Merge pull request #900 from hacdias/patch-2
Add filemanager directive
2016-06-27 08:32:54 -06:00
Matt Holt
eddb6f0a79 Merge pull request #905 from nesl247/hotfix/go-get-url
Fix go get url
2016-06-27 08:32:27 -06:00
Harrison Heck
70b75d1433 Fix go get url
Fixes #904
2016-06-26 14:40:13 -04:00
Matthew Holt
15fa5cf2da
OnFirstStartup and OnFinalShutdown callbacks added
OnStartup and OnShutdown callbacks now run as part of restarts, too.
The startup and shutdown directives only run their commands NOT as part
of restarts, as before. Some middleware that use OnStartup may need to
switch to OnFirstStartup and implement OnFinalShutdown to do any cleanup
as needed.
2016-06-23 18:02:12 -06:00