HTTP request error with Live Link

Issue Summary

I am using “file_get_contents” to load a json file from my theme (functions.php). Locally, everything works fine, but when I open the site via a Live Link I get an error:

( ! ) Warning: file_get_contents( Failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized in /Users/bernhardpoppe/Local Sites/l4f/app/public/wp-content/themes/l4f/functions.php on line 56

The code that causes the problem:
$manifest = file_get_contents(get_template_directory_uri() . “/dist/parcel-manifest.json”);

System Details

  • Which version of Local is being used? → Local 6.2.1
  • What Operating System (OS) and OS version is being used? → MacOS Monterey

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.