Skip to content

Error: invalid rule (A path rule cannot contain anything after * token) #1148

@jacobcarrington

Description

@jacobcarrington

Describe the bug

I'm getting the following error from my __header file when running netlify dev

Error: invalid rule (A path rule cannot contain anything after * token)

Configuration

the content of my __header file looks like this:

/*
  X-Frame-Options: SAMEORIGIN
  X-XSS-Protection: 1; mode=block
  cache-control: max-age=31536000
  cache-control: no-cache
  cache-control:  no-store
  cache-control: must-revalidate
/*.js
  cache-control: max-age=31536000
/*.css
  cache-control: max-age=31536000
/*.woff
  cache-control: max-age=31536000

adding to https://play.netlify.com/headers, this is deemed valid

Expected behavior

I would expect netlify dev to run and apply these header rules

CLI Output

netlify dev fail with the following error; Error: invalid rule (A path rule cannot contain anything after * token)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions