Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Handler http.Handler = HTTPHandler{}
Handler is the default http.Handler for this package. Handler does not do any logging.
You can use it rather than creating a new HTTPHandler if you do not need any logging.
If you need logging, then create your own HTTPHandler instead.
Functions ¶
This section is empty.
Types ¶
type HTTPHandler ¶
type HTTPHandler struct {
LogError func(...any)
}
HTTPHandler deals with redirecting a HTTP request to an HTTPS request.
So, for example, a request to:
http://example.com/apple/banana/cherry
Would get redirected to:
https://example.com/apple/banana/cherry
(Note that the scheme of the URL changed from "http" to "https".)
func (HTTPHandler) ServeHTTP ¶
func (receiver HTTPHandler) ServeHTTP(responsewriter http.ResponseWriter, request *http.Request)
Click to show internal directories.
Click to hide internal directories.