-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: prevent overwriting of CloudFlare _headers
file
#8693
Conversation
🦋 Changeset detectedLatest commit: 26ab757 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This reverts commit 4e27ca4.
@@ -22,10 +22,6 @@ export default function () { | |||
|
|||
const relativePath = posix.relative(tmp, builder.getServerDirectory()); | |||
|
|||
builder.log.info( | |||
`adapter-cloudfare is writing its own _headers file. If you have your own, you should duplicate the headers contained in: ${dest}/_headers` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If people had done this previously as we advised and now we are appending them, they will end up with duplicates. I don't know how much of an issue that is. Does this need to be considered a breaking change and major release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're right about this being a breaking change. I never thought of that.
Are there any examples of existing configurations and how people have been getting around this?
thank you! |
fixes #8692
Adds the append flag
a
to the file writing method for_headers
.This appends the auto-generated headers to any existing
_headers
file copied from/static
or creates a new one if it doesn't exist (as it did before).Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.