proxy

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	RemarkURL     string
	RoutePath     string
	HTTP2HTTPS    bool
	CacheExternal bool
	Timeout       time.Duration
	ImageService  *image.Service
}

Image extracts image src from comment's html and provides proxy for them this is needed to keep remark42 running behind of HTTPS serve all images via https

func (Image) Convert

func (p Image) Convert(commentHTML string) string

Convert img src links to proxied links depends on enabled options

func (Image) Handler

func (p Image) Handler(w http.ResponseWriter, r *http.Request)

Handler returns http handler respond to proxied request

Jump to

Keyboard shortcuts

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