cdn

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirectCDNContentEndpoint

func DirectCDNContentEndpoint(c *gin.Context)

DirectCDNContentEndpoint serves request for content directly from Cloud Storage. HEAD, GET are supported operations, also ranged GET requests.

func FeedEndpoint

func FeedEndpoint(c *gin.Context)

FeedEndpoint handles request for feed.xml by redirecting to the public storage bucket

func RedirectCDNContentEndpoint

func RedirectCDNContentEndpoint(c *gin.Context)

RedirectCDNContentEndpoint serves request for content by redirecting to the public Cloud Storage bucket. HEAD, GET are supported operations.

Types

type Header struct {
	Range           string `header:"Range"`
	UserAgent       string `header:"User-Agent"`
	Forwarded       string `header:"Forwarded"`
	XForwardedFor   string `header:"X-Forwarded-For"`
	XForwwardedHost string `header:"X-Forwarded-Host"`
	Referer         string `header:"Referer"`
}

Header extracts the relevant HTTP header stuff

func ExtractAndLogHeaders

func ExtractAndLogHeaders(c *gin.Context) (*Header, error)

ExtractAndLogHeaders extract the extra headers needed to serve the request and logs them

Jump to

Keyboard shortcuts

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