Commit Graph

470 Commits

Author SHA1 Message Date
Matthew Holt
7173764d6d markdown: Render lists as part of summary (upstream bug workaround)
See github.com/russross/blackfriday/issues/189
2015-08-05 07:37:51 -06:00
Abiola Ibrahim
3b910645e7 Markdown: generate static sites after links. 2015-08-05 09:55:04 +01:00
Abiola Ibrahim
b5d79bdccc Markdown: Removed unused constant. 2015-08-05 01:01:57 +01:00
Abiola Ibrahim
2ab466599d Markdown: Modify development mode to generate links on page requests. 2015-08-05 00:41:04 +01:00
Abiola Ibrahim
851026d3fa Markdown: Watch for file changes. Removed sitegen dependency for links. 2015-08-04 23:35:09 +01:00
Matthew Holt
8d81ae88da fastcgi: Add HTTPS env variable on HTTPS connections 2015-08-03 17:16:24 -06:00
Matthew Holt
36fa6e857b markdown: Sitegen only occurs if directory exists
We do this by returning an error and stopping link generation (which scans the markdown path for files)
2015-08-01 16:09:10 -06:00
Matthew Holt
35e25be1a4 browse: Size displayed in IEC format
Powers of 2, or base 1024, rather than powers of 10 or base 1000. The powers of 2 are technically more accurate.
2015-07-29 19:15:38 -06:00
Matthew Holt
f7129b219e Fix markdown tests that I broke 2015-07-29 17:47:33 -06:00
Matthew Holt
ff28bc8b0a markdown: Change .Url -> .URL, increase summary length
Also, summary truncated at nearest space instead of middle of word, and code spans become part of summary.
2015-07-29 17:43:00 -06:00
Matthew Holt
0b01489f7d templates: Date -> Now, add Replace and Truncate 2015-07-29 17:43:00 -06:00
Maxime
ec51e14451 Merge branch 'master' of https://github.com/mholt/caddy 2015-07-29 23:43:26 +02:00
Matt Holt
86e9749d6c Merge pull request #204 from abiosoft/master
markdown: Add .Links action and flattened metadata structure

.Links available only for generated sites and variables no longer in a [variables] category in metadata (flat structure).
2015-07-29 11:12:02 -06:00
Abiola Ibrahim
aa89f30f2a renamed sorter to byDate. 2015-07-29 18:06:53 +01:00
Maxime
da794a866e Change date of the files in test to serve the static file and not generate a new one 2015-07-29 18:00:08 +02:00
Maxime
705cd16dee Fixed path issue: was absolute path but should be relative path 2015-07-29 17:12:32 +02:00
Maxime
0168a627a4 Added test on markdown static files generation 2015-07-29 16:21:35 +02:00
Abiola Ibrahim
7b29568eb1 Code cleanups.
Fix more race conditions.
2015-07-29 12:21:34 +01:00
Matthew Holt
a585379bbb proxy: Parse error if property is unknown 2015-07-28 13:50:40 -06:00
Abiola Ibrahim
e240cd5ba2 Metadata variables flattened.
Fix race condition on parsers.
Added page links generator.
2015-07-28 05:21:09 +01:00
Maxime
d1eb2ea9e2 Changed metadata variables type:
from map[string]interface{} to map[string]string
2015-07-26 18:32:34 +02:00
Matthew Holt
453d3eb567 markdown: Fix when md file has front matter but empty body 2015-07-25 15:47:33 -06:00
Matt Holt
bf47951f3a Merge pull request #196 from evermax/master
markdown, browse: Integrated Context struct for templating
2015-07-25 15:15:51 -06:00
Maxime
604c8abb59 Remove debug line, add file name as default title 2015-07-25 22:39:13 +02:00
Maxime
ef4a4b0ab8 Removed attribute not needed. 2015-07-24 22:17:14 +02:00
Maxime
24bdb433c9 Changed .Var to .Doc in Markdown templates
Put the title into the .Doc variables as well.
Changed the test template file to use new names.
2015-07-24 22:14:05 +02:00
Matthew Holt
a578c43810 browse: Add txt files to list of default files 2015-07-24 10:27:19 -06:00
Matthew Holt
74b758034e redir: Allows replacements; defaults to exact match redirects
This is a breaking change for those who expect catch-all redirects to preserve path; use {uri} variable explicitly now
2015-07-24 10:27:19 -06:00
Matthew Holt
04571ff393 NewReplacer takes third argument for empty value string 2015-07-24 10:27:19 -06:00
pyed
1589129ea1 Save sorting preferences as cookies
To be used across directories
2015-07-23 13:25:03 +03:00
Maxime
97dcc79a7f Remove undesired committed debug logs 2015-07-23 11:53:15 +02:00
Maxime
bc2feece4b Moved test files to testdata folder.
Changed the tests accordingly.
2015-07-23 09:35:46 +02:00
Maxime
2df30d186e Added a test on markdown for the default template 2015-07-21 17:45:32 +02:00
Maxime
6451e10d3e Add context to markdown template
Created a struct containing middleware.Context, Title, Markdown and the
variables from the user to use to render the template.
The title now can be accessed via {{.Title}}.
The variables can now be accessed via {{.Var.myVariableName}}.
2015-07-21 07:58:34 +02:00
Matthew Holt
00997db5ae markdown: Fix large markdown files that got truncated 2015-07-18 12:57:16 -06:00
Maxime
2d5320c454 Added test for the browse directive
Created sample files for the test
2015-07-18 11:37:05 +02:00
Maxime
2fa6e278d2 Merge branch 'master' of https://github.com/mholt/caddy 2015-07-18 09:58:27 +02:00
Maxime
f536bc94b2 Added the Context to the browse directive
Moved the Context type to middleware and exported it.
Users can use .Include and others in browse directive templating
Created test for the templates directive.
2015-07-17 20:07:24 +02:00
Matthew Holt
afc540f6b7 Updated changes 2015-07-15 09:36:34 -06:00
Matt Holt
fcf2622c26 Merge pull request #187 from evermax/master
redir: Preserve query string on catch-all redirect (fixes #180)
2015-07-13 09:42:19 -06:00
Maxime
d9ebc5398a Changes regarding review
Use path.Join and then check if the request had a slash at the end to
place it again.
2015-07-12 21:22:15 +02:00
Maxime
eea68c34ad Changes regarding comment.
Used http status code instead of a hardcoded value.
Used url.Parse instead of url.ParseRequestURI, so that you can parse
both absolute and relative URL.
2015-07-12 16:43:35 +02:00
Maxime
8a2d0890a2 Changes regarding issue 180
The get parameters are now forwarded when redirected.
Added some tests to validate this behavior.
2015-07-12 16:01:32 +02:00
Peter Hellberg
33fa29fda0 extensions: Initial tests 2015-07-10 12:05:06 -06:00
Matthew Holt
c82d7c2dd2 templates: Better error handling for missing files 2015-07-06 23:37:27 -06:00
Abiola Ibrahim
d4f0ac2303 Merge remote-tracking branch 'upstream/master' 2015-07-06 06:43:02 +01:00
Abiola Ibrahim
4588812d24 Gzip: Fix wildcard extension bug. 2015-07-06 06:36:48 +01:00
Matthew Holt
9467dbdd40 Fix errors tests 2015-07-05 23:23:35 -06:00
Matthew Holt
71c4fdbc85 errors: Prepend timestamp to log entry 2015-07-05 23:20:37 -06:00
Matthew Holt
b5579ca910 gzip: Remove mimes 2015-07-03 18:13:30 -06:00
Matthew Holt
32ef35b952 gzip: Fix tests 2015-07-01 19:05:31 -06:00
Matthew Holt
abf22909f1 gzip: Make it gzip again 2015-07-01 18:56:30 -06:00
Matt Holt
263fa064cd Merge pull request #169 from abiosoft/master
git: Remove from core (available as add-on)
2015-07-01 11:44:49 -06:00
Matthew Holt
915172e9ef templates: Close files after done including them 2015-07-01 11:36:37 -06:00
Matthew Holt
4d066b7e30 ext: Only append extension if request is not for directory (fixes #173) 2015-07-01 11:35:52 -06:00
Abiola Ibrahim
a7f0705bcf Merge remote-tracking branch 'upstream/master' 2015-07-01 14:01:45 +01:00
Matthew Holt
7a42e60bcb templates: Support for nested include files
i.e. included files are also parsed as templates
2015-06-30 18:21:18 -06:00
Abiola Ibrahim
aecdecbdf8 Merge remote-tracking branch 'upstream/master' 2015-06-30 17:31:40 +01:00
Abiola Ibrahim
4240817a3a Fix for Issue 141: index not found, 502 Bad Gateway. 2015-06-30 11:54:50 +01:00
Abiola Ibrahim
3f1f6720ee Decouple git middleware from caddy core. Now available as an add-on at https://github.com/abiosoft/caddy-git. 2015-06-28 00:31:52 +01:00
Matt Holt
47096e112a Merge pull request #156 from pyed/sort
browse: Ability to sort
2015-06-22 12:40:58 -06:00
pyed
68add78230 Implement sorting functionality for "Browse" 2015-06-21 18:04:47 +03:00
Matt Holt
6b27d4ce11 Merge pull request #131 from slav123/master
fastcgi: fix #127
2015-06-17 17:26:52 -06:00
Slawomir Jasinski
f11e136068 Update fcgiclient.go 2015-06-18 09:12:35 +10:00
Matthew Holt
c811d416a7 log: Customizable default error function 2015-06-15 10:17:09 -06:00
Simon Jefford
6c1f2af53a log: ensure the correct status is always logged
in the case of error (>=400) then no response may have been sent
2015-06-14 21:00:27 +01:00
Matt Holt
d7051e986f Merge pull request #134 from tw4452852/hijack
middleware: let middleware.responseRecorder be a http.Hijacker
2015-06-12 08:26:49 -06:00
Tw
e79a88856a let middleware.responseRecorder be a http.Hijacker
Signed-off-by: Tw <tw19881113@gmail.com>
2015-06-12 11:42:28 +08:00
Slawomir Jasinski
db2368cd0b Removed parentheses #127 2015-06-12 11:33:55 +10:00
slav123
29404e34d9 code cleanup 2015-06-11 13:17:56 +10:00
Slawomir Jasinski
14b64fef43 fix #127
fixes issue with Status header coming from php-fpm 5.5 different then regular "HTTP/1.1 200 OK".
If server returns  Status code - "200" will be handled properly instead "throwing runtime error: index out of range"
2015-06-11 09:59:30 +10:00
Abiola Ibrahim
e0f10c2b03 Gzip: Accept MIME types. 2015-06-10 22:02:08 +01:00
Matt Holt
01aca02edc Merge pull request #129 from tw4452852/rename_internal
internal: rename middleware's package name from `internal` to `inner`
2015-06-10 08:04:27 -06:00
Tw
90921a9deb rename middleware's name from internal to inner
The internal package has the special meaning in go
(see https://golang.org/s/go14internal).
So rename it to `inner`.

Signed-off-by: Tw <tw19881113@gmail.com>
2015-06-10 15:48:41 +08:00
AJ ONeal
d6a7dfc1a5 add ability to do meta redirects
Proper Location redirects are disadvantageous in some situations.
For example, you may want a developer to know that a resource is available
via https, but you don't want an insecure call to the API to succeed.
2015-06-10 05:48:40 +00:00
Matt Holt
3a795de828 Merge pull request #117 from zmb3/errorfmt
Update error strings (start with lowercase letters)
2015-06-09 08:24:08 -06:00
Tw
b717e6f2d8 Add unit test for errors middleware
Signed-off-by: Tw <tw19881113@gmail.com>
2015-06-09 15:24:53 +08:00
Zac Bergquist
3aff1677cc Fix failing test that's looking for a specific error message. 2015-06-08 20:29:48 -04:00
Zac Bergquist
9e97d79c81 Ensure that proper names are capitalized in error strings. 2015-06-08 17:35:16 -04:00
Zac Bergquist
41e1f1ffa5 Update error strings (start with lowercase letters) 2015-06-07 20:49:17 -04:00
Abiola Ibrahim
c42e60a3d2 Git: fix for data races. 2015-06-07 20:39:24 +01:00
Abiola Ibrahim
13db60d382 rename gzip test function to TestGzipHandler 2015-06-07 01:27:36 +01:00
Abiola Ibrahim
c9233d7446 Gzip: Added compression level, extension and path filters. 2015-06-07 01:21:54 +01:00
Abiola Ibrahim
820b2af43a FastCGI: allow "unix:" prefix for unix sockets. 2015-06-04 23:03:58 +01:00
Matt Holt
1cb0053720 Merge pull request #102 from brk0v/proxy-without
proxy: Add "without" option
2015-06-04 08:24:48 -06:00
Viacheslav Biriukov
822a615c6c rollback tests 2015-06-04 14:02:52 +00:00
Viacheslav Biriukov
593557659c fix tests and change naming 2015-06-04 13:57:39 +00:00
xenolf
b4780a41d3 Added webhook functionality to the git middleware.
The webhook providers reside behind a small interface which determines if
a provider should run. If a provider should run it delegates
responsibility of the request to the provider.
ghdeploy initial commit

Added webhook functionality to the git middleware.
The webhook providers reside behind a small interface which determines if a provider should run. If a provider should run it delegates responsibility of the request to the provider.

Add tests

Remove old implementation

Fix inconsistency with git interval pulling.

Remove '\n' from logging statements and put the initial pull into a startup function
2015-06-04 03:24:16 +02:00
Viacheslav Biriukov
4790dacbf7 add without to proxy middleware 2015-06-03 18:06:24 +00:00
Matthew Holt
9ce0e8e17c proxy: Added tests for reverse websocket proxy 2015-06-01 22:39:53 -06:00
Matthew Holt
32825e8a79 basicauth: Patch timing vulnerability 2015-06-01 20:33:07 -06:00
Austin
68cd4bdeab check server response instead of client 2015-06-01 19:29:32 -07:00
Austin
ccd3e55b32 changes as noted in PR 2015-06-01 10:23:57 -07:00
Austin
56ec7b9887 websocket directive, upgrade comparison 2015-05-30 11:34:54 -07:00
Austin
2d6ff40649 add supported for ws in reverse proxy 2015-05-29 19:21:50 -07:00
Austin
dd946f8ab5 moved init to policy.go 2015-05-28 18:16:23 -07:00
Austin
593aec9ab1 changes per comment 2015-05-28 16:53:54 -07:00
Austin
6b173b5170 added custom policy support 2015-05-28 15:56:11 -07:00
Abiola Ibrahim
2013838bfd Git: mock time functions in tests. 2015-05-28 10:20:26 +01:00
Abiola Ibrahim
879558b9ee Git: code refactor. replace Sleep with Ticker 2015-05-26 20:20:57 +01:00
Abiola Ibrahim
6c6e0e3f73 Git: More tests. Code refactor. 2015-05-26 04:44:47 +01:00
Matthew Holt
6f05794bb8 git: Fixed unusual but potent race condition 2015-05-25 15:39:04 -06:00
Zac Bergquist
e4b50aa814 Fix more lint warnings 2015-05-24 22:52:34 -04:00
Zac Bergquist
fd8490c689 Fix lint warnings for middleware/websockets 2015-05-24 21:04:03 -04:00
Zac Bergquist
d0a51048d7 Fix lint warnings in middleware/rewrite 2015-05-24 21:00:54 -04:00
Zac Bergquist
506f131428 Fix lint warnings for middleware/proxy 2015-05-24 20:58:17 -04:00
Abiola Ibrahim
4e94b85ec2 FastCGI: support for unix sockets. 2015-05-23 03:39:23 +01:00
Abiola Ibrahim
f44cd5d740 Git: Minor fixes. Refactor. Added tests. 2015-05-22 20:50:04 +01:00
Abiola Ibrahim
c382c885e4 use middleware.Path for base path comparison 2015-05-16 16:57:57 +01:00
Abiola Ibrahim
7ae9e3a262 Rewrite: Added new variables file, dir, fragment. 2015-05-16 16:30:15 +01:00
Abiola Ibrahim
74d162f377 Rewrite: Support for Regular Expressions. 2015-05-16 13:03:48 +01:00
Abiola Ibrahim
ad7b453f03 Rewrite: modified syntax. 2015-05-15 18:47:26 +01:00
Abiola Ibrahim
b2afc30d12 Rewrite: added regexp. awaiting documentation and tests. 2015-05-15 02:43:29 +01:00
Abiola Ibrahim
8394d72f48 Fix for Issue 72: Markdown: 500 for YAML metadata 2015-05-13 00:44:35 +01:00
Abiola Ibrahim
a1312465b5 browse: return forbidden (403) only when it is a permission error. 2015-05-10 17:58:44 +01:00
Matt Holt
e2273ea676 Merge pull request #69 from peterhellberg/headers_test
headers: Initial test for Headers and change of Rule.Url to Rule.Path
2015-05-10 07:49:11 -06:00
Matt Holt
c6eaf0db36 Merge pull request #62 from jordic/testing_basicauth
basicauth: Should write an unauthorized code to response. (Actually only returns it)
2015-05-10 07:47:16 -06:00
Michael Schoebel
e0173ec4c7 internal middleware: added tests 2015-05-10 14:41:48 +02:00
jordi collell
99fa4581aa basicauth: patch for overlapping rules 2015-05-10 08:20:58 +02:00
Matthew Holt
4272536518 markdown: sitegen keyword and run generation at startup
Also fixed bug for markdown files that don't contain front matter
2015-05-09 21:12:52 -06:00
Peter Hellberg
d9dc9326f2 headers: Initial test for Headers 2015-05-09 21:47:02 +02:00
Peter Hellberg
b5fff09b54 headers: Changed Rule.Url to Rule.Path
Updated ServeHTTP comment to indicate that it is 
setting headers and not adding them to existing values.
2015-05-09 21:45:28 +02:00
Matt Holt
a96c4d707b Merge pull request #67 from peterhellberg/redirect_test
redirect: initial test for Redirect
2015-05-09 12:21:59 -06:00
Peter Hellberg
0f9df18dfb Check if the Next handler was called unexpectedly
Removed body check and replaced urlPrinter with a inlined Next handler
2015-05-09 20:07:29 +02:00
Matthew Holt
8ea98f8cce markdown: Fix panic: assignment to entry in nil map
Ensures metadata.Variables is made
2015-05-09 11:49:28 -06:00
Matt Holt
f2f7e6825f Merge pull request #68 from abiosoft/master
Markdown: support for templates and metadata
2015-05-09 09:13:40 -06:00
Abiola Ibrahim
2f5e2f39cb markdown: remove identifier from Json metadata 2015-05-09 11:49:54 +01:00
jordi collell
4c11854927 added header match and a new failing test 2015-05-09 08:11:02 +02:00
Abiola Ibrahim
6ce83aad2b markdown: Refactor fixes 2015-05-09 00:54:39 +01:00
Abiola Ibrahim
48a12c605a markdown: Added template support. 2015-05-08 23:45:31 +01:00
Peter Hellberg
95b4e61a07 redirect: initial test for Redirect 2015-05-09 00:36:58 +02:00
stanislavromanov
a5a90fe6fc close #64 2015-05-08 17:47:37 +02:00
Abiola Ibrahim
0fccd3707d markdown: documentation done. awaiting test 2015-05-08 16:20:07 +01:00
jordi collell
253c069b26 if basic auth fails should write unauthorized to response 2015-05-08 09:41:17 +02:00
Abiola Ibrahim
2c7de8f328 Merge remote-tracking branch 'upstream/master' 2015-05-08 06:52:14 +01:00
jordi collell
64d203491c Some failing tests 2015-05-08 07:41:48 +02:00
Matthew Holt
b2ee6638e4 Tests for rewrite middleware 2015-05-07 14:55:34 -06:00
Michael Schoebel
e3d64169ed Adapted internal middleware
- Detect too many internal redirects - return 500 in this case
2015-05-07 20:48:29 +02:00
Michael Schoebel
a5b565e193 Adapted internal middleware
- redirect internally regardless of proxy status code
- support multiple internal redirects
2015-05-07 20:20:45 +02:00
Abiola Ibrahim
7443fd0973 Merge remote-tracking branch 'upstream/master' 2015-05-07 14:02:40 +01:00
Abiola Ibrahim
ba613a1567 markdown: template integration done. awaiting documentation and test 2015-05-07 13:45:27 +01:00
Abiola Ibrahim
0bfdb50ade markdown: working version of template integration. Awaiting static site generation and tests. 2015-05-07 00:19:02 +01:00
Michael Schoebel
0650dd7171 New internal middleware 2015-05-06 22:44:37 +02:00
Matthew Holt
7c844909b9 fastcgi: Add support for OPTIONS requests 2015-05-06 11:14:02 -06:00
Abiola Ibrahim
434ec7b6ea Merge remote-tracking branch 'upstream/master' 2015-05-06 09:06:14 +01:00
Matthew Holt
340a53fb80 Disabling fcgiclient tests until they can be rewritten 2015-05-05 22:53:14 -06:00
Abiola Ibrahim
25847a6192 markdown: added template codes. awaiting integration and tests 2015-05-06 03:37:29 +01:00
Matthew Holt
47717fee88 Expanded index file support to other middlewares (fixes #27) 2015-05-05 15:50:42 -06:00
Matthew Holt
a9064a7871 templates: Changed .RemoteAddr to .IP and stripped port 2015-05-05 15:49:22 -06:00
Matthew Holt
857b4f90d9 errors: Log includes file and line number of panics 2015-05-05 15:48:10 -06:00
Nimi Wariboko Jr
0ed5b364c6 Refactor proxy middleware so that 1.) From() is exposed 2.) Other upstreams can be implemented/plugged in 2015-05-04 19:58:18 -07:00
Matthew Holt
2dbd14b6dc Consistent app name/version info; pipe config data through stdin 2015-05-04 16:23:16 -06:00
Matthew Holt
085f6e9560 Keepin' the comments true 2015-05-04 13:42:39 -06:00
Matthew Holt
20118bdfd2 Clearing out the old stuff 2015-05-04 13:40:07 -06:00
Matthew Holt
e4fdf171c7 More refactoring - nearly complete 2015-05-04 11:49:49 -06:00
Matthew Holt
6029973bdc Major refactoring of middleware and parser in progress 2015-05-04 11:04:37 -06:00
Matthew Holt
995edf0566 Bringing in latest from master; refactoring under way 2015-05-04 11:02:46 -06:00
Matt Holt
5f32f9b1c8 Merge pull request #40 from ChannelMeter/proxy-middleware
Proxy Middleware: Add support for multiple backends, load balancing & healthchecks
2015-05-03 15:58:50 -06:00
Nimi Wariboko Jr
264e5b7911 Use the provided Replacer tools in order to proxy string interpolation. 2015-05-03 13:33:08 -07:00
Nimi Wariboko Jr
a28d5585f5 Export Replacer type 2015-05-03 12:43:50 -07:00
Nimi Wariboko Jr
082ae70d1d Allow responseRecorder to be nil 2015-05-03 12:38:06 -07:00
Nimi Wariboko Jr
2aa958e058 Update {remote} replacer to use X-Forwarded-For if its provided 2015-05-03 12:37:00 -07:00
Abiola Ibrahim
225d5977ff fastcgi: allow more request types. 2015-05-03 12:12:18 +01:00
Nimi Wariboko Jr
4a4b80450a Upgrade proxy middleware. Add support for: multiple backends, load balancing, health checks, and pluggable backends 2015-05-02 22:45:01 -07:00
Matthew Holt
ca95b561dc gzip: Fix Content-Length header for proxies requests (closes #38) 2015-05-02 09:20:39 -06:00
Abiola Ibrahim
9cd1587cf7 git: post pull command. retries after pull failure. 2015-05-02 04:20:01 +01:00
Abiola Ibrahim
447d0ce0e2 fastcgi: user defined environment variables 2015-05-01 19:55:47 +01:00
Matthew Holt
49bb3f1387 git: Service routine, customizable logger, no more HTTP handler 2015-05-01 12:19:30 -06:00
Abiola Ibrahim
0d2ed0784f Modified repository path to be relative to root path. 2015-05-01 17:18:58 +01:00
Abiola Ibrahim
479c611420 Implementation of Git middleware
Defaults path to site root.
2015-05-01 16:41:34 +01:00
Matthew Holt
9dfbbbcda4 errors: Pointer to handler prevents nil pointer errors in handling (fixes #15)
If we do not use a pointer here, the startup function that opens the log file stores the log file in a copy of the handler, not the same instance of the handler, causing panics during requests, which is bad, especially when the response is gzipped: the next recover() is beyond the gzip handler, so the browser downloads a gz file instead.
2015-04-30 10:16:49 -06:00
Matthew Holt
b51e8bc191 fastcgi: Fix for handling errors that come from responder 2015-04-30 07:50:07 -06:00
Thomas Hansen
17fa5a9334 adding support for fastcgi index files in subdirectories 2015-04-28 13:15:14 -06:00
Matthew Holt
9b74901b40 errors: Fix file paths for error pages & empty log filenames 2015-04-28 13:05:01 -06:00
Matthew Holt
ff344535ba Added some godoc 2015-04-27 10:56:57 -06:00
Thomas Hansen
dbef6c73bc Merge branch 'master' of https://github.com/mholt/caddy 2015-04-27 09:39:40 -06:00
Matthew Holt
fa2403c1d3 websockets: quick version fix 2015-04-27 07:35:39 -06:00
Matthew Holt
dba4dcb4a5 gzip strips Accept-Encoding header after using it 2015-04-26 22:53:47 -06:00
Thomas Hansen
9d26a9268b added comment about encoding header 2015-04-26 22:15:43 -06:00
Thomas Hansen
1b17072a89 gzip middleware now strips encoding header 2015-04-26 22:01:20 -06:00
Matthew Holt
7d46108c12 With just a destination, default redir code is now 301 2015-04-26 20:20:32 -06:00
Thomas Hansen
1ac32a5256 generalizing fastcgi parameters, and improving headers passed. 2015-04-25 21:56:14 -06:00
Thomas Hansen
9e12c45d82 Merge branch 'master' of https://github.com/mholt/caddy 2015-04-25 19:06:39 -06:00
Matthew Holt
ce74333348 Markdown requires a base path (for now) 2015-04-25 12:26:04 -06:00
Matthew Holt
27fc1672d4 Basic auth middleware 2015-04-23 14:57:07 -06:00
Matthew Holt
95dce5cdfc Latency now available with recorder and replacer 2015-04-23 13:35:56 -06:00
Matthew Holt
51139a5f56 log: Fix so user can specify custom log format 2015-04-23 13:35:21 -06:00
Matthew Holt
c10d2e0d45 Make the thing compile 2015-04-21 22:30:47 -06:00
Matthew Holt
1a8f753303 Meh. 2015-04-21 21:41:58 -06:00
Matthew Holt
23f7f5ebba Minor UI tweaks to directory listings 2015-04-21 21:36:43 -06:00
Matthew Holt
bdd145b0de Better error handling when executing templates 2015-04-21 21:36:30 -06:00
Thomas Hansen
96985fb3fd adding support for php including clean urls and wordpress permalinks 2015-04-20 17:40:54 -06:00
Matthew Holt
6a32de4b47 Use text/template because html shouldn't be escaped for this 2015-04-18 12:28:22 -06:00
Matthew Holt
f5d0ed5b1c More template love 2015-04-18 11:31:59 -06:00
Matthew Holt
55801b48ec More template functions 2015-04-18 11:08:41 -06:00
Matthew Holt
3ec870cb56 Templates middleware with "include" functionality 2015-04-18 09:57:51 -06:00
Matthew Holt
cd0421ceb8 Package extension -> extensions 2015-04-18 09:55:02 -06:00
Matthew Holt
c7af6725ca Removed Host() and Port() functions from Controller
I don't think they'll be necessary; can get same info from request Host header
2015-04-15 23:17:28 -06:00
Matthew Holt
a93db40138 Improvements to the redirect middleware 2015-04-12 18:13:58 -06:00
Matthew Holt
6ca475def8 Redirect now does exact path matching like rewrite middleware 2015-04-12 17:40:59 -06:00
Matthew Holt
d8e7adcdb4 Refactored proxy middleware 2015-04-11 17:24:47 -06:00
Matthew Holt
113b175db7 Refactored fastcgi middleware 2015-04-11 17:15:17 -06:00
Matthew Holt
40bf7c5285 Refactored redirect middleware 2015-04-11 17:06:09 -06:00
Matthew Holt
abeb337f45 Refactored rewrite middleware 2015-04-11 16:58:34 -06:00
Matthew Holt
2a0cfb608d Bug fix for default error handling with gzip 2015-04-08 23:24:59 -06:00
Matthew Holt
d33256f1dc Refactor: Middleware chain uses Handler instead of HandlerFunc 2015-04-02 23:30:54 -06:00
Matthew Holt
db2cd9e941 Renamed extensionless to extension, Extensionless to Ext 2015-04-02 21:59:45 -06:00
Matthew Holt
9f793dad28 Proxy destination may include scheme 2015-03-31 23:53:39 -06:00
Matthew Holt
f2f5d4984d Markdown defaults to .md 2015-03-31 23:41:16 -06:00
Matthew Holt
29fec4742e Detailed godoc; better error handling convention 2015-03-29 22:01:42 -06:00
Matthew Holt
0a9a19305c Made catch-all redirects possible 2015-03-29 21:48:53 -06:00
Matthew Holt
4e9c432c14 Controller/Dispenser refactoring, typo fixes 2015-03-29 19:56:19 -06:00
Matthew Holt
6bf36d922c Refactored proxy middleware to return errors 2015-03-28 16:56:56 -06:00
Matthew Holt
076d4e0ec5 Refactored web socket middleware to return errors 2015-03-28 16:56:33 -06:00
Matthew Holt
b87e6ccb76 Refactored markdown middleware to return errors 2015-03-28 16:55:40 -06:00
Matthew Holt
22707edcbf Refactored fastcgi middleware to return errors 2015-03-28 16:52:43 -06:00
Matthew Holt
7578298b3f Rewrote access log middleware 2015-03-28 16:50:42 -06:00
Matthew Holt
d2892fc799 New error handler middleware 2015-03-28 16:50:06 -06:00
Matthew Holt
878ae7ea89 Refactored rewrite middleware to return errors 2015-03-28 16:49:18 -06:00
Matthew Holt
c657948824 Refactored redir middleware to return errors 2015-03-28 16:49:06 -06:00
Matthew Holt
a39e71ca26 Refactored headers middleware to return errors 2015-03-28 16:48:43 -06:00
Matthew Holt
8f4e7f7fdc Refactored gzip middleware to return errors 2015-03-28 16:47:41 -06:00
Matthew Holt
a674450198 Refactored ext middleware to return errors 2015-03-28 16:47:28 -06:00
Matthew Holt
843f6e83a9 Refactored browse middleware to return errors 2015-03-28 16:46:54 -06:00
Matthew Holt
9378f38371 Major refactoring for better error handling 2015-03-28 16:37:37 -06:00
Matthew Holt
09aad777f4 Proper host/port splitting; also log file perms 2015-03-26 23:39:36 -06:00
Matthew Holt
da72a5fbcd Controller can register functions to run at shutdown 2015-03-26 23:22:48 -06:00
Matthew Holt
2fbfafc408 New startup and shutdown directives 2015-03-26 09:52:03 -06:00
Matthew Holt
63b39c78ee Better default template; other fixes 2015-03-24 23:05:42 -06:00
Matthew Holt
13d9bcc0c7 Clean URL middleware handles URLs ending with / 2015-03-24 21:56:22 -06:00
Matthew Holt
9672850d11 Bug fixes and improvements for browse middleware 2015-03-24 21:54:33 -06:00
Matthew Holt
00e43197fd Started browse middleware to list directory contents 2015-03-24 20:12:48 -06:00
Matthew Holt
284ab11c7f Little bit of cleanup 2015-03-21 15:18:50 -06:00
Matthew Holt
5d4726446d Finished dispenser tests 2015-03-21 14:36:32 -06:00
Matthew Holt
010ac23e8a More tests! 2015-03-21 11:18:37 -06:00
Matthew Holt
6d869ef55b Support multiple occurrences of markdown directive 2015-03-21 10:59:29 -06:00
Matthew Holt
35225fe2d3 Docs and comments, la la 2015-03-20 18:11:54 -06:00
Matthew Holt
1b7415a81b Markdown handles titles a little better 2015-03-20 00:01:39 -06:00
Matthew Holt
abdadf1ee1 Improvements to websocket middleware 2015-03-19 23:52:56 -06:00
Matthew Holt
d7ae9fb4a2 Added markdown middleware 2015-03-16 11:45:51 -06:00
Matthew Holt
af56c5033c New method to get remaining arguments on a line 2015-03-16 11:23:17 -06:00
Matthew Holt
3858e31942 A couple pesky env variables to deal with in websockets 2015-03-03 18:39:38 -07:00
Matthew Holt
37f0a37ed2 Filled out more web socket stuff 2015-03-03 17:36:18 -07:00
Matthew Holt
811c6a986f Added WebSocket middleware 2015-03-03 09:49:45 -07:00
Matthew Holt
974acbf38c Partial support for location contexts in config files 2015-03-03 09:49:01 -07:00
Matthew Holt
0e43271cc9 Basic proxy feature works 2015-02-02 23:41:35 -07:00
Matthew Holt
5ae1790e52 Moved controller into its own file; other minor cleanups 2015-01-31 10:15:17 -07:00
Matthew Holt
16997d85eb Made 'extensionless' middleware more modular/useful 2015-01-30 11:09:36 -07:00
Matthew Holt
ae2a2d5b00 Godoc for middleware packages and server package 2015-01-29 23:52:18 -07:00
Matthew Holt
bcdf04d00e Inlined a fixed version of the fastcgi_client dependency 2015-01-29 23:48:35 -07:00