Problem/Motivation

Looks like https://git.drupalcode.org/project/drupalci_environments/-/blob/producti... enables rewrite but not headers.

Drupal's .htaccess file adds stuff within <IfModule mod_headers.c>. #2854817: Duplicate X-Content-Type-Options headers both with the value nosniff discovered a bug with it, and we want to ensure that the test coverage for it runs correctly on DrupalCI.

Steps to reproduce

Proposed resolution

Add a2enmod headers within apache.m4.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

    Comments

    effulgentsia created an issue. See original summary.

    andypost’s picture

    makes sense

    • andypost committed 7b20314e on dev
      Issue #3226187 by effulgentsia, andypost: Enable mod_headers and...
    andypost’s picture

    Title: Enable mod_headers on Apache » Enable mod_headers and mod_expires on Apache
    Assigned: andypost » Unassigned
    Status: Active » Needs review

    now images are building and I added mod_expires as it also mentioned in .htaccess

    andypost’s picture

    andypost’s picture

    D7 has fail
    - https://git.drupalcode.org/issue/drupal-3443234/-/jobs/1432789
    - https://git.drupalcode.org/issue/drupal-3443234/-/jobs/1432799

    Detailed test results
    ---------------------
    ---- BootstrapPageCacheTestCase ----
    Status    Group      Filename          Line Function                            
    --------------------------------------------------------------------------------
    Fail      Other      bootstrap.test     197 BootstrapPageCacheTestCase->testPag
        X-Content-Type-Options header was sent.
    andypost’s picture

    And that's expected behavior that header is always set https://git.drupalcode.org/project/drupal/-/blob/7.x/.htaccess?ref_type=...

    andypost’s picture

    Status: Needs review » Reviewed & tested by the community

    Tests on D7 using patch went green, so gonna commit to production #3116482-9: Duplicate X-Content-Type-Options headers both with the value nosniff [D7]

    • andypost committed 9c756fcb on production
      Issue #3226187 by effulgentsia, andypost: Enable mod_headers and...
    andypost’s picture

    Status: Reviewed & tested by the community » Fixed

    Status: Fixed » Closed (fixed)

    Automatically closed - issue fixed for 2 weeks with no activity.