Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-17278

Cache Headers for Files Served through file.php

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • Attachments
    • None

      Cloudflare and I would assume other caching services by default do not cache files with certain extensions like .php There are options to create custom cache rules  for whatever you want regardless of the source. 

      The cache header for files served through file.php is set to private as it should be as a default otherwise you run the risk of caching files in PM's or private forums. Since there is no way for the caching service to determine what to cache there is no way to allow caching of attachments unless you want to expose non public files to the public.

      A check should be performed to see if the file is publicly accessible and if so set the header to public allowing caching of attachments that are not in private forums or PM's. This is not Cloudflare specific but would apply to any caching service that is going to respect the header.

            Unassigned Unassigned
            thecoalman thecoalman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: