diff --git a/www/www.vcl.tftpl b/www/www.vcl.tftpl index 8babf79..ceeda7e 100644 --- a/www/www.vcl.tftpl +++ b/www/www.vcl.tftpl @@ -230,7 +230,7 @@ sub vcl_recv { if (req.method !~ "^(GET|HEAD|POST|PUT|DELETE|OPTIONS|PATCH|FASTLYPURGE)") { error 806 "Not Implemented"; } - + %{ if private_extra_vcl_recv != "" ~} ${private_extra_vcl_recv} %{ endif ~} @@ -380,9 +380,9 @@ sub vcl_recv { } %{ endif ~} - # Strip cookies for requests to /chat/* that lack a session cookie, + # Strip cookies for requests to /chat or /chat/* that lack a session cookie, # otherwise pass through - if (req.url ~ "^/chat/") { + if (req.url.path ~ "^/chat(/.*)?$") { if (req.http.cookie:_govuk_chat_session) { return(pass); # These endpoints make use of HEAD requests and we don't want these