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

Add server info to response header #749

Closed
zzgvh opened this issue Sep 24, 2014 · 4 comments
Closed

Add server info to response header #749

zzgvh opened this issue Sep 24, 2014 · 4 comments
Assignees
Milestone

Comments

@zzgvh
Copy link
Contributor

zzgvh commented Sep 24, 2014

For debugging purposes the Up app (and possibly other clients too) could use the RSR version info, like the one that's visible in the admin.

Suggested implementation of this is as a custom response header using the same format as in the admin:

X-RSR-Version: <version tag> (<commit hash>) [<branch name>]

A small middleware class is one way to implement this across all server responses. But I'd like to hear from @carlio or @osgl if this could be added at an even "lower" level in the webserver configuration.

@carlio
Copy link
Contributor

carlio commented Sep 24, 2014

Given that the version number is an artefact of the code and not the provisioning environment, I don't think it makes sense to add it to the nginx config. Apart from anything else, you would have to update nginx at the same time as RSR, while if it is done in RSR, the environment does not need to know or care.

@zzgvh
Copy link
Contributor Author

zzgvh commented Sep 26, 2014

Ok, middleware it is then!

zzgvh added a commit that referenced this issue Oct 1, 2014
The middleware adds a response header of the format:

X-RSR-Verision: "Tag:<tag name> Commit:<commit hash> Branch:<git branch name>"
zzgvh added a commit that referenced this issue Oct 1, 2014
@kardan
Copy link
Contributor

kardan commented Jan 6, 2015

What's the status on this?

@KasperBrandt
Copy link
Contributor

Test plan

GIVEN a request to RSR
WHEN a response is given
THEN the response header in the form of X-RSR-Version: tag={tag}, commit={commit}, branch={branch} is returned

@MichaelAkvo MichaelAkvo moved this to Done in RSR Dec 8, 2022
@MichaelAkvo MichaelAkvo added this to RSR Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

5 participants