sharedhost

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReplaceTilde

func ReplaceTilde(replacement string) sr.Middleware

ReplaceTilde builds a middleware which substitutes a leading '~' in the request path.

It makes the alteration to a copy of the request which is then passed into the wrapped Handler. This way middlewares outside of this one inspecting the request afterwards will see the original URL.

Typically the replacement should end with a "/", so that the ~ ends up mapping to a particular directory on the filesystem. For instance with a replacement string of "users/", "domain.com/~jim/index.gmi" maps to "domain.com/users/jim/index.gmi".

Types

This section is empty.

Jump to

Keyboard shortcuts

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