mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
depstubber
This commit is contained in:
53
go/ql/test/experimental/CWE-942/vendor/github.com/rs/cors/stub.go
generated
vendored
Normal file
53
go/ql/test/experimental/CWE-942/vendor/github.com/rs/cors/stub.go
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
// Code generated by depstubber. DO NOT EDIT.
|
||||
// This is a simple stub for github.com/rs/cors, strictly for use in testing.
|
||||
|
||||
// See the LICENSE file for information about the licensing of the original library.
|
||||
// Source: github.com/rs/cors (exports: Options; functions: New)
|
||||
|
||||
// Package cors is a stub of github.com/rs/cors, generated by depstubber.
|
||||
package cors
|
||||
|
||||
import (
|
||||
http "net/http"
|
||||
)
|
||||
|
||||
type Cors struct {
|
||||
Log Logger
|
||||
}
|
||||
|
||||
func (_ *Cors) Handler(_ http.Handler) http.Handler {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ *Cors) HandlerFunc(_ http.ResponseWriter, _ *http.Request) {}
|
||||
|
||||
func (_ *Cors) OriginAllowed(_ *http.Request) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (_ *Cors) ServeHTTP(_ http.ResponseWriter, _ *http.Request, _ http.HandlerFunc) {}
|
||||
|
||||
type Logger interface {
|
||||
Printf(_ string, _ ...interface{})
|
||||
}
|
||||
|
||||
func New(_ Options) *Cors {
|
||||
return nil
|
||||
}
|
||||
|
||||
type Options struct {
|
||||
AllowedOrigins []string
|
||||
AllowOriginFunc func(string) bool
|
||||
AllowOriginRequestFunc func(*http.Request, string) bool
|
||||
AllowOriginVaryRequestFunc func(*http.Request, string) (bool, []string)
|
||||
AllowedMethods []string
|
||||
AllowedHeaders []string
|
||||
ExposedHeaders []string
|
||||
MaxAge int
|
||||
AllowCredentials bool
|
||||
AllowPrivateNetwork bool
|
||||
OptionsPassthrough bool
|
||||
OptionsSuccessStatus int
|
||||
Debug bool
|
||||
Logger Logger
|
||||
}
|
||||
Reference in New Issue
Block a user