psr

package module
v0.0.0-...-976fb84 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: MIT Imports: 19 Imported by: 0

README

caddy-prerender

not works yet :(

have to deal with caddy http request it does not contain original host and scheme

// not in r *http.Request or in
or, _ := r.Context().Value(caddyhttp.OriginalRequestCtxKey).(http.Request)

As a solution run local file server and bypass chrome requests to it

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AfterLoadDelay int `json:"after_load_delay,omitempty"`
	CacheTTL       int `json:"cache_ttl,omitempty"`
}

type Prerender

type Prerender struct {
	// contains filtered or unexported fields
}

func (Prerender) CaddyModule

func (Prerender) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*Prerender) Cleanup

func (m *Prerender) Cleanup() error

func (*Prerender) InitChromeCtx

func (m *Prerender) InitChromeCtx(ctx context.Context)

func (*Prerender) Provision

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

Provision implements caddy.Provisioner.

func (Prerender) ServeHTTP

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

ServeHTTP implements caddyhttp.MiddlewareHandler.

func (*Prerender) UnmarshalCaddyfile

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

UnmarshalCaddyfile implements caddyfile.Unmarshaler.

func (*Prerender) Validate

func (m *Prerender) Validate() error

Validate implements caddy.Validator.

Jump to

Keyboard shortcuts

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