-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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 shield.svg api route to generate custom shields/badges #6565
Conversation
Maybe add some settings to enable or disable this for the private servers who don't want this enabled. Otherwise looking good |
Yeah, I was thinking it might be an issue with the online users option. Do you think it should be a setting to disable all, or just the online users one? |
Maybe a setting to disable them each individually? That way it's highly configurable? |
Yes, I echo the same sentiments already emitted by @graywolf336 — especially about servers which are private, but other than that? I like it! |
This is awesome! 👍 |
This is awesome. Can we secure that against DDOS attack? Maybe cache the count of online users for 1min, idk if it will help :) |
@rodrigok I've changed it to cache online count for 1 minute as you suggested |
@graywolf336 @geekgonecrazy @marceloschmidt @sampaiodiego what do you think guys? Is that good in the code point of view? |
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.
👍 looks good to me!
I think for github specifically this won't be too bad in terms of DDoS. They do caching I believe here as well |
This is really awesome, thanks for this. |
@RocketChat/core
Related to #867
Add api route to generate svg shields/badges for channels, online users and generally to join chat.
Example badges
/api/v1/shield.svg
/api/v1/shield.svg?type=online
/api/v1/shield.svg?type=online&name=Rocket.Chat
/api/v1/shield.svg?type=channel&channel=general
/api/v1/shield.svg?type=channel&name=Rocket.Chat&channel=general
api/v1/shield.svg?icon=false&name=Rocket.Chat
Admin Option