Documentation ¶
Index ¶
Constants ¶
View Source
const ( HTTPBindAddress = "http-bind-address" HTTPBindPort = "http-bind-port" HTTPGracefulTimeout = "http-graceful-timeout" HTTPLogRequests = "http-log-requests" HTTPCORSEnabled = "http-cors-enabled" HTTPCORSAllowOrigins = "http-cors-allow-origins" HTTPCORSAllowMethods = "http-cors-allow-methods" HTTPCORSAllowHeaders = "http-cors-allow-headers" HTTPCORSAllowCredentials = "http-cors-allow-credentials" HTTPCORSExposeHeaders = "http-cors-expose-headers" HTTPCORSMaxAge = "http-cors-max-age" HTTPTLSCertFile = "http-tls-cert-file" HTTPTLSKeyFile = "http-tls-key-file" )
Variables ¶
View Source
var DefaultConfig = &Config{ BindAddress: net.ParseIP("127.0.0.1"), BindPort: 1323, CORSEnabled: false, CORS: middleware.CORSConfig{ AllowOrigins: []string{"*"}, AllowMethods: []string{ http.MethodGet, http.MethodHead, http.MethodPut, http.MethodPatch, http.MethodPost, http.MethodDelete, }, AllowHeaders: []string{}, AllowCredentials: false, ExposeHeaders: []string{}, MaxAge: 0, }, GracefulTimeout: 30 * time.Second, LogRequests: true, TLS: &TLS{ CertFile: "", KeyFile: "", }, }
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.