-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix: refresh expired preview tokens #11236
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
Conversation
🦋 Changeset detectedLatest commit: 02685bf The changes in this PR will be included in the next version bump. 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 |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
|
This is still failing, so taking back to draft |
|
I have tested locally with a synthetic copy of the error page. Currently waiting an hour for the real timeout to test that. |
|
Failed to automatically backport this PR's changes to Wrangler v3. Please manually create a PR targeting the Depending on your changes, running Notes:
|
Currently the proxy catches expired preview tokens by detecting the error message, and dispatching an event. However currently the event handler is not implemented. This PR implements token refresh by storing the latest bundle and config and then using them to re-run
this.#previewToken. I've extracted the call so it can be used in bothonBundleCompleteand in the new refresh handler. After refreshing, we dispatchreloadCompletewith the new credentials.Fixes [CUSTESC-56000]