mirror of
https://github.com/elyby/chrly.git
synced 2024-11-26 16:51:59 +05:30
Исправлена ошибка, когда к скинам моянга приклеивался наш домен
This commit is contained in:
parent
64bf7deb79
commit
c03021403a
@ -16,7 +16,6 @@ func Skin(w http.ResponseWriter, r *http.Request) {
|
||||
rec, err := data.FindRecord(username)
|
||||
if (err != nil) {
|
||||
http.Redirect(w, r, "http://skins.minecraft.net/MinecraftSkins/" + username + ".png", 301)
|
||||
log.Println("Cannot get skin for username " + username)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -19,11 +19,13 @@ func Textures(w http.ResponseWriter, r *http.Request) {
|
||||
if (err != nil || rec.SkinId == 0) {
|
||||
rec.Url = "http://skins.minecraft.net/MinecraftSkins/" + username + ".png"
|
||||
rec.Hash = string(tools.BuildNonElyTexturesHash(username))
|
||||
} else {
|
||||
rec.Url = tools.BuildElyUrl(rec.Url)
|
||||
}
|
||||
|
||||
textures := data.TexturesResponse{
|
||||
Skin: &data.Skin{
|
||||
Url: tools.BuildElyUrl(rec.Url),
|
||||
Url: rec.Url,
|
||||
Hash: rec.Hash,
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user