You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
select method, count(*)
fromfastly_logs.govuk_wwwwhere year=2024and month=5and method not in ('GET','HEAD','POST','PUT','DELETE','CONNECT','OPTIONS','TRACE','PATCH','FASTLYPURGE')
group by method
order bycount(*) desc;
# method _col11 DEBUG 230862 TENB 144583 PROPFIND 77004 HEADX 40295 TRACK 36 BVRPGMCC 17 CET 18 get 19 INDEX 1
I'm pretty sure we can also nuke CONNECT and TRACE.
The text was updated successfully, but these errors were encountered:
Description:
- Previously non-standard/unimplemented HTTP requests such as `DEBUG` will pass through Fastly and hit the origin where nginx rejects them as 501. See [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/501)
as to why this is the appropriate status code to return
- Here Fastly is configured to throw a 501 and return custom HTML. The error code `806` and not `805` is used as the latter is used by `_security_txt_response.vcl` in the [shared VCL](https://github.com/alphagov/govuk-fastly/blob/main/modules/shared/_security_txt_response.vcl)
- `FASTLYPURGE` is how the non-standard `PURGE` method appears in [VCL](https://www.fastly.com/documentation/reference/vcl/variables/client-request/req-method/)
- Tested in integration and staging:
```
curl -w '\n%{http_code}\n' -X DEBUG https://www.staging.publishing.service.gov.uk
<!DOCTYPE html>
<html>
<head>
<title>Welcome to GOV.UK</title>
<style>
body { font-family: Arial, sans-serif; margin: 0; }
header { background: black; }
h1 { color: white; font-size: 29px; margin: 0 auto; padding: 10px; max-width: 990px; }
p { color: black; margin: 30px auto; max-width: 990px; }
</style>
</head>
<body>
501
```
- See [proof of concept here](#78) with data to show that it won't block anything unintentionally
- Closes#79
Kudos to @richardTowers for data and proof of concept.
supporting data
I'm pretty sure we can also nuke CONNECT and TRACE.
The text was updated successfully, but these errors were encountered: