proxy

package
v2.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ScriptBackup = `function handle()
	set_header("X-Sola-Script", "` + lua.LuaVersion + `")
	return 301, "%s"..URL
end`
	ScriptFavicon = `function handle()
	if (URL == "/favicon.ico")
	then
		set_header("X-Sola-Script", "` + lua.LuaVersion + `")
		return 301, "%s"
	end
end`
)

script(s)

View Source
const (
	Issuer = "sola/proxy"
)

Ctx

Variables

View Source
var (
	ErrLuaScriptReturn = errors.New("Lua Script should return (int, string)")
	ErrUnsupportCode   = errors.New("Lua Script only support 200, 301")
)

error(s)

Functions

func Backup

func Backup(addr string) sola.Middleware

Backup Middleware

func BackupSola

func BackupSola(addr string) *sola.Sola

BackupSola App

func Balance added in v2.1.1

func Balance(c sola.Context, targets []*url.URL) *httputil.ReverseProxy

Balance Proxy

func Favicon

func Favicon(url string) sola.Middleware

Favicon Middleware

func New

func New(script string) sola.Middleware

New Proxy Middleware

Types

This section is empty.

Jump to

Keyboard shortcuts

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