instagram: fix public instance with edge proxy
This commit is contained in:
parent
6f5e792b01
commit
0786312feb
1 changed files with 2 additions and 1 deletions
|
@ -97,6 +97,7 @@ func GetCDNURL(contentURL string) (string, error) {
|
||||||
func GetPostCaption(
|
func GetPostCaption(
|
||||||
postURL string,
|
postURL string,
|
||||||
) (string, error) {
|
) (string, error) {
|
||||||
|
edgeProxyClient := util.GetEdgeProxyClient()
|
||||||
req, err := http.NewRequest(
|
req, err := http.NewRequest(
|
||||||
http.MethodGet,
|
http.MethodGet,
|
||||||
postURL,
|
postURL,
|
||||||
|
@ -120,7 +121,7 @@ func GetPostCaption(
|
||||||
req.Header.Set("Cache-Control", "no-cache")
|
req.Header.Set("Cache-Control", "no-cache")
|
||||||
req.Header.Set("TE", "trailers")
|
req.Header.Set("TE", "trailers")
|
||||||
|
|
||||||
resp, err := httpSession.Do(req)
|
resp, err := edgeProxyClient.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("failed to send request: %w", err)
|
return "", fmt.Errorf("failed to send request: %w", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue