chore: lint command and hook
This commit is contained in:
3
.hooks/pre-commit
Executable file
3
.hooks/pre-commit
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
make lint
|
||||||
@@ -19,7 +19,10 @@ func RobotsTxt(w http.ResponseWriter, r *http.Request) {
|
|||||||
if error("Error trying to read ai block list", err, http.StatusInternalServerError) {
|
if error("Error trying to read ai block list", err, http.StatusInternalServerError) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
w.Write(bytes)
|
_, err = w.Write(bytes)
|
||||||
|
if error("Error trying to write ai block list", err, http.StatusInternalServerError) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
w.Header().Add("Cache-Control", "max-age=604800, stale-while-revalidate=86400, stale-if-error=86400")
|
w.Header().Add("Cache-Control", "max-age=604800, stale-while-revalidate=86400, stale-if-error=86400")
|
||||||
w.Header().Add("CDN-Cache-Control", "max-age=604800")
|
w.Header().Add("CDN-Cache-Control", "max-age=604800")
|
||||||
|
|||||||
Reference in New Issue
Block a user