- cmd/lerproxy/reverse/proxy.go - Reorganized imports for logical grouping. - cmd/lerproxy/main.go - Added URL rewriting capability and updated command-line usage documentation. - Reorganized imports for consistency. - Replaced `context.T` with `context.Context` for standardization. - Updated timeout handling logic to use `context.WithTimeout`. - pkg/protocol/ws/connection.go - Replaced `fmt.Errorf` with `errorf.E` for error formatting. - cmd/lerproxy/util/util.go - Renamed file for better clarity. - Removed unnecessary package documentation. - cmd/lerproxy/hsts/proxy.go - Removed redundant package comments. - cmd/lerproxy/tcpkeepalive/listener.go - Removed redundant package comments. - Adjusted import order. - cmd/lerproxy/buf/bufpool.go - Removed unnecessary package comments. - cmd/lerproxy/README.md - Updated package usage examples and installation instructions. - Removed outdated and unnecessary instructions.
15 lines
258 B
Go
15 lines
258 B
Go
package hsts
|
|
|
|
import "net/http"
|
|
|
|
type Proxy struct {
|
|
http.Handler
|
|
}
|
|
|
|
func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|
w.Header().
|
|
Set("Strict-Transport-Security",
|
|
"max-age=31536000; includeSubDomains; preload")
|
|
p.ServeHTTP(w, r)
|
|
}
|