mymodule

package module
v0.0.0-...-3bcbfe6 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: MIT Imports: 16 Imported by: 0

README

Repl Auth middleware for Caddy

This module provides a drop in repl auth middleware for Caddy. When using Caddy as a reverse proxy with this module, the server being proxied will get the exact same information as if it were hosted on replit[^compat]. An example config can be found in config.json5.

To use Caddy with this module you will need to build it using xcaddy.[^xcaddy] You can also use the build.sh script that is provided in this repository.

[^compat]: If something works on replit but not with this caddy module please report an issue as that is a bug. [^xcaddy]: Read https://caddyserver.com/docs/build#xcaddy for information on how to do that

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AUTH_HTML []byte

Functions

This section is empty.

Types

type ReplAuth

type ReplAuth struct {
	IgnoreHost bool     `json:"ignoreHost,omitempty"`
	ForceAuth  bool     `json:"forceAuth,omitempty"`
	Hosts      []string `json:"hosts,omitempty"`
	// contains filtered or unexported fields
}

func (ReplAuth) CaddyModule

func (authInstance ReplAuth) CaddyModule() caddy.ModuleInfo

func (*ReplAuth) Provision

func (authInstance *ReplAuth) Provision(ctx caddy.Context) error

func (*ReplAuth) ServeHTTP

func (authInstance *ReplAuth) ServeHTTP(writer http.ResponseWriter, request *http.Request, handler caddyhttp.Handler) error

Jump to

Keyboard shortcuts

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