Skip to content

Commit

Permalink
Merge pull request #12 from TheColvinCo/varnish-token
Browse files Browse the repository at this point in the history
token VARNISH_PURGE_TOKEN
  • Loading branch information
jlopezxs authored Mar 24, 2021
2 parents 38543ca + c1eb4b9 commit 11119a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion varnish/conf/default.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sub vcl_recv {
unset req.http.forwarded;
# To allow API Platform to ban by cache tags
if (req.method == "BAN") {
if (client.ip !~ invalidators) {
if (req.http.x-varnish-token != std.getenv("VARNISH_PURGE_TOKEN")) {
return (synth(405, "Not allowed"));
}
if (req.http.ApiPlatform-Ban-Regex) {
Expand Down

0 comments on commit 11119a5

Please sign in to comment.