serve hashedfavicon path as png

This commit is contained in:
Nick Krecklow
2020-05-08 05:05:46 -05:00
parent 82e8db0128
commit 15814cf86b
2 changed files with 10 additions and 3 deletions

View File

@ -5,6 +5,9 @@ const TimeTracker = require('./time')
const config = require('../config')
const minecraftVersions = require('../minecraft_versions')
const HASHED_FAVICON_URL = '/hashedfavicon_'
const HASHED_FAVICON_EXTENSION = '.png'
class ServerRegistration {
serverId
lastFavicon
@ -239,7 +242,7 @@ class ServerRegistration {
getFaviconUrl () {
if (this.faviconHash) {
return '/hashedfavicon?' + this.faviconHash
return HASHED_FAVICON_URL + this.faviconHash + HASHED_FAVICON_EXTENSION
} else if (this.data.favicon) {
return this.data.favicon
}