Matthew Holt
42acdad9e5
Fix error handling with Validate when loading modules ( fixes #2658 )
The return statement was improperly nested in context.go
6 years ago
Matthew Holt
fdd871e177
go.mod: Append /v2 to module name; update all import paths
See https://github.com/golang/go/wiki/Modules#semantic-import-versioning
6 years ago
Matthew Holt
3177ee8010
Add license
6 years ago
Matthew Holt
a63cb3e3fd
Implement etag; fix related bugs in encode and templates middlewares
6 years ago
Matthew Holt
d49f762f6d
Various bug fixes and minor improvements
- Fix static responder so it doesn't replace its own headers config,
and instead replaces the actual response header values
- caddyhttp.ResponseRecorder type optionally buffers response
- Add interface guards to ensure regexp matchers get provisioned
- Use default HTTP port if one is not explicitly set
- Encode middleware writes status code 200 if not written upstream
- Templates and markdown only try to execute on text responses
- Static file server sets Content-Type based on file extension only
(this whole thing -- MIME sniffing, etc -- needs more configurability)
6 years ago
Matthew Holt
5137859e47
Rename caddy2 -> caddy
Removes the version from the package name
6 years ago
Matthew Holt
ef5f29cfb2
Do not allow Go standard lib to sniff Content-Type header
6 years ago
Matthew Holt
613aecb898
Change import paths to GitHub package names
6 years ago
Matthew Holt
bc00d840e8
Export types and fields necessary to build configs (for config adapters)
Also flag most fields with 'omitempty' for JSON marshaling
6 years ago
Matthew Holt
2fd98cb040
Module.New() does not need to return an error
6 years ago
Matthew Holt
9d54f655aa
Take care of remaining TODOs in the browse responder
6 years ago
Matthew Holt
65195a726d
Implement rewrite middleware; fix middleware stack bugs
6 years ago
Matthew Holt
a969872850
Default error handler; rename StaticFiles -> FileServer
6 years ago
Matthew Holt
aaacab1bc3
Sanitize paths in static file server; some cleanup
Also remove AutomaticHTTPSError for now
6 years ago
Matthew Holt
22995e5655
Implement most of browse; fix a couple obvious bugs; some cleanup
6 years ago
Matthew Holt
fec7fa8bfd
Implement most of static file server; refactor and improve Replacer
6 years ago
Matthew Holt
2d056fbe66
Initial commit of Storage, TLS, and automatic HTTPS implementations
6 years ago
Matthew Holt
6621406fa8
Very basic middleware and route matching functionality
6 years ago