feat: Add curl error page and new tests
All checks were successful
Build Docker / BuildImage (push) Successful in 52s
All checks were successful
Build Docker / BuildImage (push) Successful in 52s
This commit is contained in:
7
curl.py
7
curl.py
@@ -123,4 +123,9 @@ def curl_response(request):
|
||||
if os.path.exists(f"templates/{path}.html"):
|
||||
return render_template(f"{path}.html")
|
||||
|
||||
return error_response(request)
|
||||
# Return curl error page
|
||||
error = {
|
||||
"code": 404,
|
||||
"message": "The requested resource was not found on this server."
|
||||
}
|
||||
return render_template("error.ascii",header=get_header(),error=error), 404, {'Content-Type': 'text/plain; charset=utf-8'}
|
||||
Reference in New Issue
Block a user