commons

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PenguinDomains = pie.Strings{"penguin-stats.io", "penguin-stats.cn", "exusi.ai"}

PenguinDomains are domains which Penguin Statistics hold

Functions

func CleanClientRoute

func CleanClientRoute(route string) (string, error)

CleanClientRoute is to verify if a path passed from client is a valid endpoint and removes query strings or other relatively-useless parameters to avoid flooding

func GenOriginChecker

func GenOriginChecker() func(r *http.Request) bool

func IsValidDomain

func IsValidDomain(u *url.URL) bool

IsValidDomain validates if a domain in url.URL provided is a Penguin Statistics official domain

func PenguinDomainsOrigin

func PenguinDomainsOrigin() (origins []string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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