Complete the command to purge the cache for a specific URL using curl.
curl -X [1] http://localhost/cache/purge/urlThe PURGE method is used by nginx cache purging modules to remove cached content for a URL.
Complete the nginx configuration line to enable cache purging for the location '/cache/purge/'.
location /cache/purge/ {
[1] on;
}The directive proxy_cache_purge on; enables purging cached content in the specified location.
Fix the error in this nginx cache purge location block by completing the missing directive.
location /purge/ {
allow 127.0.0.1;
deny all;
[1] on;
}The proxy_cache_purge on; directive is required to allow purging in this location block.
Fill both blanks to complete the nginx cache purge location that allows purging only from localhost and enables purging.
location /cache/purge/ {
[1] 127.0.0.1;
[2] all;
proxy_cache_purge on;
}The allow 127.0.0.1; permits localhost, and deny all; blocks others from purging.
Fill all three blanks to complete a dictionary comprehension that maps URLs to their cache purge commands.
purge_commands = [1]: f"curl -X [2] http://localhost[3]" for [1] in urls if urls[[1]] == 'cache'
This comprehension creates commands for URLs marked as 'cache' using the PURGE method.