Allow set http headers for request

Created on 9 November 2015, over 8 years ago
Updated 18 May 2023, about 1 year ago

Allow set http headers for drupal_http_request on configuration form. In my case, I need to disallow direct URL access to images on production site with code in .htaccess similar to

# Disallow direct URL access to images.
  RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?example.com [NC]
  RewriteRule .*\.(jpg|jpeg|png|gif)$ - [NC,F,L]

But I still want to load images from production to local machine. So, I'd like to set Referer header for the request.

✨ Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡·πŸ‡ΊRussia sergei_brill

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024