* fix: improve error handling for resource closing and JSON encoding in MakeChallenge * chore: update CHANGELOG with recent changes and improvements * refactor: simplify RenderIndex function and improve error handling --------- Signed-off-by: Jason Cameron <git@jasoncameron.dev>
This commit is contained in:
parent
2db4105479
commit
78bb67fbf7
8 changed files with 48 additions and 23 deletions
|
|
@ -73,7 +73,7 @@ func NoStoreCache(next http.Handler) http.Handler {
|
|||
})
|
||||
}
|
||||
|
||||
// Do not allow browsing directory listings in paths that end with /
|
||||
// NoBrowsing prevents directory browsing by returning a 404 for any request that ends with a "/".
|
||||
func NoBrowsing(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if strings.HasSuffix(r.URL.Path, "/") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue