wpversion

package module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

README

caddy2-wordpress-version

caddy2 middleware to set X-WP-Core-Version header for incoming requests that are meant to be directly sent to php-fpm so that central core wordpress files can be used for such requests

wp_version {
  base_path /var/www/vhosts
  wp_version_cache_expiry 24
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WPVersion

type WPVersion struct {
	BasePath            string        `json:"base_path"`
	CacheExpiryDuration time.Duration `json:"cache_expiry_duration"`
	// contains filtered or unexported fields
}

WPVersion is the middleware struct.

func (*WPVersion) CaddyModule

func (m *WPVersion) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*WPVersion) Cleanup added in v0.0.4

func (m *WPVersion) Cleanup() error

func (*WPVersion) InterfaceGuard added in v0.0.4

func (m *WPVersion) InterfaceGuard() caddyhttp.MiddlewareHandler

func (*WPVersion) Provision added in v0.0.4

func (m *WPVersion) Provision(ctx caddy.Context) error

func (*WPVersion) ServeHTTP

func (m *WPVersion) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error

ServeHTTP implements the caddyhttp.MiddlewareHandler interface.

func (*WPVersion) UnmarshalCaddyfile

func (m *WPVersion) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

UnmarshalCaddyfile implements caddyfile.Unmarshaler.

Jump to

Keyboard shortcuts

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