MM-13997 Prioritize images over OpenGraph metadata when requesting metadata (#10241)

This commit is contained in:
Harrison Healey
2019-02-09 04:44:38 -05:00
committed by Hanzei
parent 4fef9fe9ea
commit 0e31ce9110

View File

@@ -364,7 +364,7 @@ func (a *App) getLinkMetadata(requestURL string, timestamp int64, isNewPost bool
// /api/v4/image requires authentication, so bypass the API by hitting the proxy directly
body, contentType, err = a.ImageProxy.GetImageDirect(a.ImageProxy.GetUnproxiedImageURL(request.URL.String()))
} else {
request.Header.Add("Accept", "text/html, image/*")
request.Header.Add("Accept", "image/*, text/html")
client := a.HTTPService.MakeClient(false)
client.Timeout = time.Duration(*a.Config().ExperimentalSettings.LinkMetadataTimeoutMilliseconds) * time.Millisecond