You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using nextjs 14.2.3 and found some weird routing flows.
I have a server action that is called from form submission in client component.
When the server action do the job, it redirect to another page.
I could see log that async function was executed correctly and then it redirected.
In middleware, it logs twice and there is POST 303 message between the logs.
Is this intended?
Is this something related to #57257 ?
if so, is #63786 released?
[UPDATE]
I compared those requests and one is from Next-Router-Prefetch and it has request header "x-action-redirect".
I temporarily added bypassing incoming requests having 'x-action-redirect' request header.
Please someone clarify this whether this routing behavior is intended.
if (request.headers.get('x-action-redirect')) return response;
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
I am using nextjs 14.2.3 and found some weird routing flows.
I have a server action that is called from form submission in client component.
When the server action do the job, it redirect to another page.
I could see log that async function was executed correctly and then it redirected.
In middleware, it logs twice and there is POST 303 message between the logs.
Is this intended?
Is this something related to #57257 ?
if so, is #63786 released?
[UPDATE]
I compared those requests and one is from Next-Router-Prefetch and it has request header "x-action-redirect".
I temporarily added bypassing incoming requests having 'x-action-redirect' request header.
Please someone clarify this whether this routing behavior is intended.
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions