2018-01-26 08:43:53 +01:00
|
|
|
package handlers
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
|
2019-05-15 18:18:54 +02:00
|
|
|
"github.com/zom-bi/ovpn-certman/views"
|
2018-01-26 08:43:53 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
func NotFoundHandler(w http.ResponseWriter, req *http.Request) {
|
|
|
|
view := views.New(req)
|
|
|
|
view.RenderError(w, http.StatusNotFound)
|
|
|
|
}
|
|
|
|
|
|
|
|
func ErrorHandler(w http.ResponseWriter, req *http.Request) {
|
|
|
|
view := views.New(req)
|
|
|
|
view.RenderError(w, http.StatusInternalServerError)
|
|
|
|
}
|
2018-01-29 09:18:19 +01:00
|
|
|
|
|
|
|
func CSRFErrorHandler(w http.ResponseWriter, req *http.Request) {
|
|
|
|
view := views.New(req)
|
|
|
|
view.RenderError(w, http.StatusForbidden)
|
|
|
|
}
|