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

Query parameter resolved wrong via image api proxy #1252

Closed
rainbowdashlabs opened this issue Jul 22, 2023 · 1 comment
Closed

Query parameter resolved wrong via image api proxy #1252

rainbowdashlabs opened this issue Jul 22, 2023 · 1 comment

Comments

@rainbowdashlabs
Copy link

Observed/problematic behavior

I use shields.io to create badges of the latest version and other stuff. However the badges are resolved via a proxy I guess.

The image url for the badge itself is https://img.shields.io/nexus/maven-releases/de.eldoria.schematic-sanitizer/api?label=Release&logo=Release&server=https%3A%2F%2Feldonexus.de&style=for-the-badge, which works totally fine.

However once posted it gets wrapped by hangars image api resulting in
https://hangar.papermc.io/api/internal/image/https://img.shields.io/nexus/maven-releases/de.eldoria.schematic-sanitizer/api?label=Release&logo=Release&server=https%3A%2F%2Feldonexus.de&style=for-the-badge

This looks right for me at least, but I am not a web dev. However if you look at the image behind the api you get an error from shields.io that the server query parameter could not be resolved.

Expected behavior

That the shield.io image is displayed as it is given in the link embedded into the markdown

Steps to reproduce

embed the link https://img.shields.io/nexus/maven-releases/de.eldoria.schematic-sanitizer/api?label=Release&logo=Release&server=https%3A%2F%2Feldonexus.de&style=for-the-badge into an markdown image tag

![image](https://img.shields.io/nexus/maven-releases/de.eldoria.schematic-sanitizer/api?label=Release&logo=Release&server=https%3A%2F%2Feldonexus.de&style=for-the-badge)

The issue can be seen here as well https://hangar.papermc.io/Eldoria/SchematicSanitizer. i copied the badge url and formatting from GitHub to verify that it is indeed different behaviour: https://github.com/eldoriarpg/schematic-sanitizer

Other

No response

@rainbowdashlabs
Copy link
Author

Thanks for the quick fix ♥

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

No branches or pull requests

1 participant