Skip to content

Support maxAge query parameter to Shields.io in badge redirect #3000

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

Closed
wmayner opened this issue Jul 13, 2017 · 2 comments
Closed

Support maxAge query parameter to Shields.io in badge redirect #3000

wmayner opened this issue Jul 13, 2017 · 2 comments

Comments

@wmayner
Copy link
Contributor

wmayner commented Jul 13, 2017

Details

Shields.io allows passing a maxAge query parameter that should address #1612, but this is not supported by the RTD redirect.

Expected Result

The Location header from curl -v https://readthedocs.org/projects/pyphi/badge/?version=latest&style=flat-square&maxAge=600 should be:

Location: https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat-square&maxAge=600

Actual Result

maxAge is ignored, though style is respected.

The Location header from curl -v https://readthedocs.org/projects/pyphi/badge/?version=latest&style=flat-square&maxAge=600 is:

Location: https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat-square
@ericholscher
Copy link
Member

This would be a great contribution! The code is here: https://github.com/rtfd/readthedocs.org/blob/master/readthedocs/projects/views/public.py#L119

@wmayner
Copy link
Contributor Author

wmayner commented Jul 17, 2017

Implemented in PR #3005.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants