Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive

fix(nuxt): don't try to set cookie after redirect - #7288

Merged
pi0 merged 3 commits into
mainfrom
fix/cookie-redirect
Sep 7, 2022
Merged

fix(nuxt): don't try to set cookie after redirect#7288
pi0 merged 3 commits into
mainfrom
fix/cookie-redirect

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

resolvesnuxt/nuxt#14056

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

We were trying to set headers after redirect when cookies were used. Alternatively we could check writableEnded but I think it's better to have warning surface in this kind of way.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroedanielroe added bug Something isn't working 🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage labels Sep 6, 2022
@danielroe
danielroe requested a review from pi0September 6, 2022 14:20
@danielroedanielroe self-assigned this Sep 6, 2022
@netlify

netlifyBot commented Sep 6, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs ready!

NameLink
🔨 Latest commit4472d4e
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/6317744103fa99000829a686
😎 Deploy Previewhttps://deploy-preview-7288--nuxt3-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Comment threadpackages/nuxt/src/app/composables/cookie.ts Outdated
Comment threadpackages/nuxt/src/app/composables/cookie.ts Outdated
Comment threadpackages/nuxt/src/app/composables/cookie.ts Outdated
@pi0
pi0 merged commit 5a69f48 into mainSep 7, 2022
@pi0
pi0 deleted the fix/cookie-redirect branch September 7, 2022 08:34
@pi0pi0 mentioned this pull request Sep 9, 2022
@pi0pi0 mentioned this pull request Sep 15, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.xbugSomething isn't working🔨 p3-minor-bugPriority 3: a bug in an edge case that only affects very specific usage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[unhandledRejection] Cannot set headers after they are sent to the client

2 participants

@danielroe@pi0