-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[New] Add instance id to response headers #7211
Conversation
packages/rocketchat-lib/package.js
Outdated
@@ -17,6 +17,7 @@ Npm.depends({ | |||
|
|||
Package.onUse(function(api) { | |||
api.use('rate-limit'); | |||
api.use('webapp') |
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.
fixed.
@@ -36,3 +36,9 @@ Meteor.publish = function(name, func) { | |||
return func.apply(this, arguments); | |||
}); | |||
}; | |||
|
|||
WebApp.rawConnectHandlers.use(function(req, res, next) { | |||
const setHeader = res.setHeader; |
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.
irrelevant on old commit.
|
||
WebApp.rawConnectHandlers.use(function(req, res, next) { | ||
const setHeader = res.setHeader; | ||
res.setHeader('X-Instance-ID', InstanceStatus.id()); |
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.
fixed 👍
should we add a |
@sampaiodiego added! |
@RocketChat/core
This will help a lot with debugging multi-instance issues.
Debating putting behind a setting. I don't think we use instance id for anything special, so I don't know that exposing it would be harmful in any way.