aliyun-docker-https
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -5,2 +5,10 @@ | ||
if (typeof config === 'string') { | ||
config = { | ||
mode: config | ||
}; | ||
} | ||
config = config || {}; | ||
var header = config.header || 'x-forwarded-proto' | ||
@@ -7,0 +15,0 @@ , ignore = config.ignore || [] |
{ | ||
"name": "aliyun-docker-https", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Http to https for aliyun docker.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -26,3 +26,4 @@ # aliyun-docker-https | ||
app.use(require('./index.js')({ | ||
ignore: ['/test/url$'] | ||
ignore: ['/test/url$'], | ||
mode: 'koa' | ||
})); | ||
@@ -29,0 +30,0 @@ app.listen(3000) |
@@ -13,7 +13,13 @@ | ||
/* | ||
// 302 | ||
curl -H 'x-forwarded-proto: http' -i http://localhost:3000/ | ||
curl -H 'x-forwarded-proto: http' -i http://localhost:3000/test/urla | ||
curl -H 'x-forwarded-proto: http' -i http://localhost:3000/test/urla?a=a | ||
// 404 | ||
curl -H 'x-forwarded-proto: https' -i http://localhost:3000/ | ||
curl -H 'x-forwarded-proto: https' -i http://localhost:3000/test/url | ||
curl -H 'x-forwarded-proto: http' -i http://localhost:3000/test/url | ||
curl -H 'x-forwarded-proto: http' -i http://localhost:3000/test/urla | ||
*/ |
5393
78
51