httputil

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSecure

func IsSecure(rawURL string) (bool, error)

Types

type CORSConfig

type CORSConfig struct {
	AllowedOrigins     []string      `` /* 241-byte string literal not displayed */
	AllowMethods       []string      `` /* 219-byte string literal not displayed */
	AllowHeaders       []string      `` /* 214-byte string literal not displayed */
	DisableCredentials bool          `` /* 216-byte string literal not displayed */
	ExposeHeaders      []string      `` /* 215-byte string literal not displayed */
	MaxAge             time.Duration `` /* 215-byte string literal not displayed */
}

func (*CORSConfig) Configure

func (c *CORSConfig) Configure(router *gin.Engine)

type HTTPConfig

type HTTPConfig struct {
	Port int        `env:"PORT" value-name:"PORT" long:"port" description:"Port to listen on" default:"8000"`
	CORS CORSConfig `group:"cors" namespace:"cors" env-namespace:"CORS"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL