Comparing version 1.0.6 to 1.0.7
@@ -12,3 +12,4 @@ "use strict"; | ||
all = "all", | ||
verbs = ["DELETE", "GET", "POST", "PUT", "PATCH"]; | ||
allMethod = all.toUpperCase(), | ||
methods = ["DELETE", "GET", "POST", "PUT", "PATCH"]; | ||
@@ -45,3 +46,3 @@ class Woodland { | ||
if (override || !result) { | ||
result = verbs.filter(i => this.allowed(i, uri, host, override)).join(", ").replace("GET", "GET, HEAD, OPTIONS"); | ||
result = methods.filter(i => this.allowed(i, uri, host, override)).join(", ").replace("GET", "GET, HEAD, OPTIONS"); | ||
this.permissions.set(host + "_" + uri, result); | ||
@@ -203,3 +204,3 @@ } | ||
[allMap.get(all), allMap.get(method), hostMap.get(all), hostMap.get(method)].forEach(map => { | ||
[allMap.get(allMethod), allMap.get(method), hostMap.get(allMethod), hostMap.get(method)].forEach(map => { | ||
if (map) { | ||
@@ -206,0 +207,0 @@ Array.from(map.keys()).filter(route => { |
{ | ||
"name": "woodland", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Lightweight HTTP/HTTPS router with virtual hosts", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -0,1 +1,2 @@ | ||
<img src="https://avoidwork.github.io/woodland/logo.svg" width="108" /> | ||
# woodland | ||
@@ -73,2 +74,2 @@ | ||
Copyright (c) 2016 Jason Mulligan | ||
Licensed under the BSD-3 license. | ||
Licensed under the BSD-3 license. |
15028
355
75