Cache clear is not working if the site uses HTTP Auth

Created on 2 December 2015, almost 9 years ago
Updated 10 August 2024, about 1 month ago

We often use http authentication to protect our development- and staging-environments from being visited by unauthorised users or bots. After installing apc module we get an error when clearing cache with drush:

$ drush cc all
'all' cache was cleared.                                                                                                                                                                                                                                                                                                                                       [success]
xmlrpc() error: (401) Unauthorized

Should this be fixed in apc module to allow authentication or do we need to fix that on server level by allowing requests from the same machine?

๐Ÿ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

๐Ÿ‡จ๐Ÿ‡ญSwitzerland dermario Zรผrich

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.

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    Under the hood, drupal_http_request() is used to send the requests to clear the site cache. If drupal_http_request() has an $options value that helps with that, it can be done. Otherwise, the alternative is allowing those requests that come from the same server.

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    It is possible to pass credentials to drupal_http_request(). Since the credentials should be written on the settings.php file, they should not be written as plain text.

  • Status changed to Closed: outdated about 1 month ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    The Drush support code has been removed. It could eventually be re-added, but it will be implemented differently.

Production build 0.71.5 2024