[GH-ISSUE #66] Gravatar #44

Closed
opened 2026-02-26 10:35:47 +03:00 by kerem · 6 comments
Owner

Originally created by @joachimtingvold on GitHub (Jul 2, 2016).
Original GitHub issue: https://github.com/PowerDNS-Admin/PowerDNS-Admin/issues/66

Hi,

Could Gravatar-support be added, as an alternative to uploading avatars?

Originally created by @joachimtingvold on GitHub (Jul 2, 2016). Original GitHub issue: https://github.com/PowerDNS-Admin/PowerDNS-Admin/issues/66 Hi, Could Gravatar-support be added, as an alternative to uploading avatars?
kerem closed this issue 2026-02-26 10:35:47 +03:00
Author
Owner

@ivanfilippov commented on GitHub (Jul 13, 2016):

@ngoduykhanh

Can you review and assist if you can with this? I have it working here github.com/ivanfilippov/PowerDNS-Admin@c22f3424f6

But I feel like there should be a better way than injecting the local variable on user load. I tried to make it a local variable in the model but it doesn't stick around. There's an option to make a custom Jinja filter to do md5 hashes, but I'm not sure if that's a better solution.

<!-- gh-comment-id:232262268 --> @ivanfilippov commented on GitHub (Jul 13, 2016): @ngoduykhanh Can you review and assist if you can with this? I have it working here https://github.com/ivanfilippov/PowerDNS-Admin/commit/c22f3424f6b03e66b4b90c3c3a9659924b66cb86 But I feel like there should be a better way than injecting the local variable on user load. I tried to make it a local variable in the model but it doesn't stick around. There's an option to make a custom Jinja filter to do md5 hashes, but I'm not sure if that's a better solution.
Author
Owner

@ngoduykhanh commented on GitHub (Jul 13, 2016):

Hi @ivanfilippov ,

Honestly I don't like the idea of adding one more value in the model for this purpose. We better to use Jinja filter, it is more flexible.

Please take a look at my gravatar branch with commit 3edf9b01fa

Thanks.

<!-- gh-comment-id:232376468 --> @ngoduykhanh commented on GitHub (Jul 13, 2016): Hi @ivanfilippov , Honestly I don't like the idea of adding one more value in the model for this purpose. We better to use Jinja filter, it is more flexible. Please take a look at my `gravatar` branch with commit 3edf9b01faac33bc5b6574256490f85e3f2c2253 Thanks.
Author
Owner

@ivanfilippov commented on GitHub (Jul 13, 2016):

@ngoduykhanh Nice, I like it!

If you'd like, I think you can simplify the code a bit since I don't think we need to check for SSL. It should be ok and error-free to request gravatars over HTTPS even when PDNS-Admin is loaded over HTTP, as opposed to the other way around which would cause errors.

👍

<!-- gh-comment-id:232411273 --> @ivanfilippov commented on GitHub (Jul 13, 2016): @ngoduykhanh Nice, I like it! If you'd like, I think you can simplify the code a bit since I don't think we need to check for SSL. It should be ok and error-free to request gravatars over HTTPS even when PDNS-Admin is loaded over HTTP, as opposed to the other way around which would cause errors. :+1:
Author
Owner

@ngoduykhanh commented on GitHub (Jul 13, 2016):

@ivanfilippov : do you mean forcing to load gravatar with HTTPS even PowerDNS-Admin is loaded over HTTP? If yes, I am ok with that too since we won't waste server resource to check if the connection is SECURE in every request :D

<!-- gh-comment-id:232416765 --> @ngoduykhanh commented on GitHub (Jul 13, 2016): @ivanfilippov : do you mean forcing to load gravatar with HTTPS even PowerDNS-Admin is loaded over HTTP? If yes, I am ok with that too since we won't waste server resource to check if the connection is SECURE in every request :D
Author
Owner

@ivanfilippov commented on GitHub (Jul 13, 2016):

Yes that's what I meant!

<!-- gh-comment-id:232420124 --> @ivanfilippov commented on GitHub (Jul 13, 2016): Yes that's what I meant!
Author
Owner

@ngoduykhanh commented on GitHub (Jul 13, 2016):

OK, removed the SSL check and added this enhancement into master branch. Thanks.

<!-- gh-comment-id:232422189 --> @ngoduykhanh commented on GitHub (Jul 13, 2016): OK, removed the SSL check and added this enhancement into `master` branch. Thanks.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/PowerDNS-Admin-PowerDNS-Admin#44
No description provided.