summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/rewrite
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-05-22 12:32:36 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-05-22 12:32:36 -0600
commitbc00d840e845d42145954839b88f1e836cd51bfd (patch)
tree0cd9f1103f3056fbadede6fd7de12ec605f50c02 /modules/caddyhttp/rewrite
parentbe9b6e7b57d5bbf13d26b1620d34efc4e12284f7 (diff)
Export types and fields necessary to build configs (for config adapters)
Also flag most fields with 'omitempty' for JSON marshaling
Diffstat (limited to 'modules/caddyhttp/rewrite')
-rw-r--r--modules/caddyhttp/rewrite/rewrite.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/caddyhttp/rewrite/rewrite.go b/modules/caddyhttp/rewrite/rewrite.go
index b7878a5..b898b1f 100644
--- a/modules/caddyhttp/rewrite/rewrite.go
+++ b/modules/caddyhttp/rewrite/rewrite.go
@@ -18,9 +18,9 @@ func init() {
// Rewrite is a middleware which can rewrite HTTP requests.
type Rewrite struct {
- Method string `json:"method"`
- URI string `json:"uri"`
- Rehandle bool `json:"rehandle"`
+ Method string `json:"method,omitempty"`
+ URI string `json:"uri,omitempty"`
+ Rehandle bool `json:"rehandle,omitempty"`
}
func (rewr Rewrite) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error {