-
Notifications
You must be signed in to change notification settings - Fork 368
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: support Blobs in unlinked sites #6279
Conversation
@@ -157,7 +157,7 @@ export const createHandler = function (options) { | |||
'client-ip': [remoteAddress], | |||
'x-nf-client-connection-ip': [remoteAddress], | |||
'x-nf-account-id': [options.accountId], | |||
'x-nf-site-id': [options?.siteInfo?.id] ?? 'unlinked', |
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.
This was the problem. [options?.siteInfo?.id]
is never falsy, even when options?.siteInfo?.id
is undefined
, so the fallback string never kicked in.
@@ -28,7 +28,7 @@ const printLocalBlobsNotice = () => { | |||
} | |||
|
|||
const startBlobsServer = async (debug: boolean, projectRoot: string, token: string) => { | |||
const directory = path.resolve(projectRoot, getPathInProject(['blobs-serves'])) | |||
const directory = path.resolve(projectRoot, getPathInProject(['blobs-serve'])) |
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.
Unrelated to the fix, but blobs-serves
was a typo. It should be blobs-serve
, in line with functions-serve
and edge-functions-serve
.
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 forgot to mention this! I saw the directory and guessed it was a typo.
Summary
We want to support Blobs in Netlify Dev even if the site is not linked — this was supposed to be addressed by #6176, but it didn't work properly (I've added more context in a comment). This PR fixes that.
Closes https://linear.app/netlify/issue/COM-211/blobs-possibly-not-working-in-framework-generated-functions.