-
Notifications
You must be signed in to change notification settings - Fork 16
Adding Support For Caching Headers (because 301 is forever) #4
base: master
Are you sure you want to change the base?
Conversation
@@ -21,6 +21,13 @@ module.exports = function (redirects, port) { | |||
res.statusCode = redirect.code || 302; | |||
res.setHeader('Content-Type', 'text/plain'); | |||
res.setHeader('Location', newUrl); | |||
|
|||
if(redirect.headers) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (
@@ -21,6 +21,13 @@ module.exports = function (redirects, port) { | |||
res.statusCode = redirect.code || 302; | |||
res.setHeader('Content-Type', 'text/plain'); | |||
res.setHeader('Location', newUrl); | |||
|
|||
if(redirect.headers) { | |||
for(var header in redirect.headers) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this the following:
Object.keys(redirect.headers).forEach(function (header) {
@gja Are you planning to address my review comments? |
Sorry. Will do in a day or so Tejas Dinkar On 29 October 2016 at 6:33:08 AM, Pavan Kumar Sunkara (
|
I can't submit an issue. Is this working for you? this __dirname+"/../config.json" would produce node-redirect/bin/../config.json |
Dude wtf, you just made a plugin that redirects to your website |
@marcofugaro You do know you can configure the host, right? |
Not without touching the |
@marcofugaro This is always intended to be a direct website. Not a dependency or middleware |
No description provided.