mirror of
https://github.com/simon987/nyaa.git
synced 2025-12-13 23:29:02 +00:00
[Config Change] Various Gravatar-related changes (#467)
* Add config option to enable/disable gravatar This is useful when running a development instance behind a firewall or NAT, where gravatar cannot reach you to serve up the default user avatar. * Pregenerate Gravatar default image URLs If possible (i.e. SERVER_NAME is set), we can pregenerate the constant gravatar default URL once at application startup, and re-use that, as url_for calls are surprisingly expensive. Especially on torrent view pages with lots of comments, this cuts down on url_for calls massively, saving on my system about 0.3 ms per call.
This commit is contained in:
@@ -152,3 +152,7 @@ ES_INDEX_NAME = SITE_FLAVOR
|
||||
# Time limit for editing a comment after it has been posted (seconds)
|
||||
# Set to 0 to disable
|
||||
EDITING_TIME_LIMIT = 0
|
||||
|
||||
# Whether to use Gravatar or just always use the default avatar
|
||||
# (Useful if run as development instance behind NAT/firewall)
|
||||
ENABLE_GRAVATAR = True
|
||||
|
||||
Reference in New Issue
Block a user