Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple X-Robot-Tags response header #2845

Closed
cressie176 opened this issue Jan 10, 2016 · 1 comment
Closed

Multiple X-Robot-Tags response header #2845

cressie176 opened this issue Jan 10, 2016 · 1 comment
Labels

Comments

@cressie176
Copy link

According to Google's Robots meta tag and X-Robots-Tag HTTP header specifications I should be able to set an X-Robots-Tag per user agent, e.g.

X-Robots-Tag: googlebot: nofollow
X-Robots-Tag: otherbot: noindex, nofollow

However I've not been able to find how to do this with express. I've found various old issues reporting similar problems with cookies. Is it currently possible?

I tried

res.setHeader('X-Robots-Tag', [ 'googlebot: nofollow' , 'otherbox: noindex, nofollow'])

but no luck.

@cressie176
Copy link
Author

Looks like it's a problem with underlying node implementation storing request headers in a map. Already reported nodejs/node#3591.

PeterDaveHello added a commit to cdnjs/new-website that referenced this issue May 18, 2016
Though we are using http/1.1 in express/nodejs, we are using CDN that
supports http/2.0, this header will be sent to CDN server.

This commit can not really benifit from that feature since nodejs
doesn't support multiple headers with the same header name yet, see:

 - nodejs/node#3591
 - expressjs/express#2845
PeterDaveHello added a commit to cdnjs/new-website that referenced this issue May 18, 2016
Though we are using http/1.1 in express/nodejs, we are using CDN that
supports http/2.0, this header will be sent to CDN server.

This commit can not really benifit from that feature since nodejs
doesn't support multiple headers with the same header name yet, see:

 - nodejs/node#3591
 - expressjs/express#2845
PeterDaveHello added a commit to cdnjs/new-website that referenced this issue May 18, 2016
Though we are using http/1.1 in express/nodejs, we are using CDN that
supports http/2.0, this header will be sent to CDN server.

This commit can not really benifit from that feature since nodejs
doesn't support multiple headers with the same header name yet, see:

 - nodejs/node#3591
 - expressjs/express#2845
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants