StageFileProxySubscriber doesn't use proxy_headers settings

Created on 6 March 2024, 3 months ago
Updated 13 June 2024, 3 days ago

Problem/Motivation

I have a server with apache basic auth (login,pass = drupal)

Origin website settings is: http://drupal:drupal@dev.MYDOMAIN.info

Stage File Proxy fails with error

Stage File Proxy encountered an error when retrieving file http://drupal:drupal@dev.MYDOMAIN.info/sites/default/files/inline-images.... Client error: `GET http://drupal:***@dev.MYDOMAIN.info/sites/default/files/inline-images/fd...` resulted in a `403 Forbidden` response:

<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->

http://drupal:drupal@dev.MYDOMAIN.info/sites/default/files/inline-images... is available into browser

And if I enable hotlink, file is showing into site

If I added

$options['headers']['User-Agent'] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36';

here https://git.drupalcode.org/project/stage_file_proxy/-/blob/2.1.x/src/Dow...

all works fine

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

ivnish Poland

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024