Commit Graph

232 Commits

Author SHA1 Message Date
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