Matthew Holt
dae4913fe3
http: Patch path matcher to ignore dots and spaces ( #2917 )
(Try saying "patch path match" ten times fast)
5 years ago
Mark Sargent
8b7d6a9ee8
v2: fixes query matcher parsing ( #2901 )
* fixes query matcher parsing
* return correct argument error when parsing query matcher
5 years ago
Matthew Holt
7c7ef8d40e
http: Shorten regexp matcher placeholders; allow "=/" for simple matcher
5 years ago
Matthew Holt
14d3fd7d03
http: path matcher supports exact matching with = prefix
5 years ago
Matthew Holt
0fc97211ab
http: Make path matcher case-insensitive
Adds tests for both the path matcher and host matcher for case
insensitivity.
If case sensitivity is required for the path, a regexp matcher can
be used instead.
This is the v2 equivalent fix of PR #2882 .
5 years ago
Pascal
bc738991b6
caddyhttp: Support placeholders in MatchHost ( #2810 )
* Replace global placeholders in host matcher
* caddyhttp: Fix panic on MatchHost tests
5 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
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
6d0350d04e
caddyhttp: Fix host matching when host has a port
6 years ago
Matthew Holt
5137859e47
Rename caddy2 -> caddy
Removes the version from the package name
6 years ago
Matthew Holt
613aecb898
Change import paths to GitHub package names
6 years ago
Matthew Holt
bf54615efc
ResponseMatcher for conditional logic of response headers
6 years ago
Matthew Holt
284fb3a98c
Allow multiple matcher sets in routes (OR'ed together)
Also export MatchRegexp in case other matcher modules find it useful.
Add comments to the exported matchers.
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
67d32e6779
Fix up matchers tests and take care of TODO in rewrite
6 years ago
Matthew Holt
65195a726d
Implement rewrite middleware; fix middleware stack bugs
6 years ago
Matthew Holt
fec7fa8bfd
Implement most of static file server; refactor and improve Replacer
6 years ago
Matthew Holt
ff5b4639d5
Some minor updates, and get rid of OnLoad/OnUnload
6 years ago
Matthew Holt
f9d93ead4e
Rename and export some types, other minor changes
6 years ago
Matthew Holt
8ae0d6a509
caddyhttp: Implement better HTTP matchers including regexp; add tests
6 years ago