Skip to content

Commit 585039f

Browse files
committed
Merge pull request expressjs#1037 from pbuyle/2.x
Support PURGE request method.
2 parents 1515d53 + de4bc80 commit 585039f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/router/methods.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ var RFC5323 = ['SEARCH'];
5454

5555
var RFC5789 = ['PATCH'];
5656

57+
/**
58+
* PURGE Method for caching reverse-proxy
59+
* http://wiki.squid-cache.org/SquidFaq/OperatingSquid#How_can_I_purge_an_object_from_my_cache.3F
60+
* https://www.varnish-cache.org/docs/trunk/tutorial/purging.html
61+
*/
62+
63+
var CACHE_PURGE = ['PURGE'];
64+
5765
/**
5866
* Expose the methods.
5967
*/
@@ -65,6 +73,7 @@ module.exports = [].concat(
6573
, RFC3648
6674
, RFC3744
6775
, RFC5323
68-
, RFC5789).map(function(method){
76+
, RFC5789
77+
, CACHE_PURGE).map(function(method){
6978
return method.toLowerCase();
7079
});

0 commit comments

Comments
 (0)