Documentation ¶
Index ¶
- func Handle404(next http.Handler, error404Handler http.Handler) http.HandlerFunc
- func MaxBytes(f http.Handler, maxBytes int64) http.HandlerFunc
- func Rewrite404(h http.Handler, rewritePath string) http.HandlerFunc
- func Rewrite404ForVueJs(h http.Handler, vueHistoryPaths []string) http.HandlerFunc
- type NotFoundRewriteResponseWriter
- type RecoveryLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Rewrite404 ¶
func Rewrite404(h http.Handler, rewritePath string) http.HandlerFunc
func Rewrite404ForVueJs ¶
func Rewrite404ForVueJs(h http.Handler, vueHistoryPaths []string) http.HandlerFunc
Rewrite404ForVueJs Implement VueJS HTML5 history mode by rewriting specific URLs to /
Types ¶
type NotFoundRewriteResponseWriter ¶
type NotFoundRewriteResponseWriter struct { http.ResponseWriter // contains filtered or unexported fields }
func (*NotFoundRewriteResponseWriter) Header ¶
func (w *NotFoundRewriteResponseWriter) Header() http.Header
func (*NotFoundRewriteResponseWriter) Write ¶
func (w *NotFoundRewriteResponseWriter) Write(p []byte) (int, error)
func (*NotFoundRewriteResponseWriter) WriteHeader ¶
func (w *NotFoundRewriteResponseWriter) WriteHeader(status int)
type RecoveryLogger ¶
func NewRecoveryLogger ¶
func NewRecoveryLogger(l *logger.Logger) *RecoveryLogger
func (*RecoveryLogger) Println ¶
func (l *RecoveryLogger) Println(v ...interface{})
Click to show internal directories.
Click to hide internal directories.