aboutsummaryrefslogtreecommitdiffstats
path: root/kube2msb/src/vendor/github.com/emicklei/go-restful/options_filter.go
diff options
context:
space:
mode:
Diffstat (limited to 'kube2msb/src/vendor/github.com/emicklei/go-restful/options_filter.go')
-rw-r--r--kube2msb/src/vendor/github.com/emicklei/go-restful/options_filter.go26
1 files changed, 0 insertions, 26 deletions
diff --git a/kube2msb/src/vendor/github.com/emicklei/go-restful/options_filter.go b/kube2msb/src/vendor/github.com/emicklei/go-restful/options_filter.go
deleted file mode 100644
index 4514ead..0000000
--- a/kube2msb/src/vendor/github.com/emicklei/go-restful/options_filter.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package restful
-
-import "strings"
-
-// Copyright 2013 Ernest Micklei. All rights reserved.
-// Use of this source code is governed by a license
-// that can be found in the LICENSE file.
-
-// OPTIONSFilter is a filter function that inspects the Http Request for the OPTIONS method
-// and provides the response with a set of allowed methods for the request URL Path.
-// As for any filter, you can also install it for a particular WebService within a Container.
-// Note: this filter is not needed when using CrossOriginResourceSharing (for CORS).
-func (c *Container) OPTIONSFilter(req *Request, resp *Response, chain *FilterChain) {
- if "OPTIONS" != req.Request.Method {
- chain.ProcessFilter(req, resp)
- return
- }
- resp.AddHeader(HEADER_Allow, strings.Join(c.computeAllowedMethods(req), ","))
-}
-
-// OPTIONSFilter is a filter function that inspects the Http Request for the OPTIONS method
-// and provides the response with a set of allowed methods for the request URL Path.
-// Note: this filter is not needed when using CrossOriginResourceSharing (for CORS).
-func OPTIONSFilter() FilterFunction {
- return DefaultContainer.OPTIONSFilter
-}