Missing referer error for

Created on 6 November 2024, 11 months ago

Problem/Motivation

Embeded media not loading as a reference page restriction in Embed.php

Proposed resolution

// Get the current URL.
      $current_url = Url::fromRoute('<current>', [], ['absolute' => TRUE])->toString();

      $response = $this->httpClient->get($this->getEmbedProviderURL($url), [
        'headers' => [
            'content-type' => 'application/json',
            'Referer' => $current_url
        ]
      ]);
πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡΄Colombia julianmancera

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @julianmancera
  • Status changed to Postponed: needs info about 1 month ago
  • πŸ‡ΊπŸ‡ΈUnited States grndlvl

    This seems like a case for us to add an alter for the headers before the http call? Adding the referrer here might not be the best as it would be the edit page, not sure if that would cause any issues. Could you let me know what provider you are using that requires the referrer there?

Production build 0.71.5 2024