Support server request context

Y2-MosheHarush
3
Y2-MosheHarush
commented 2 months ago

What problem does this feature solve?

Hi,
I am using the module to create a dynamic sitemap on a large project.
So, the routes requested from the backend by routes option as a function using Axios to get routes.

Because it is a large project, the backend works around 1 minute to fetch & generate all routes.
I check on google's advice to return status 503 with Retry-After header to tell bots to return later when the data ready.

Now my issue is I got the error by Axios, but I can't handle it to the user because I no have access to Node Request Context.

I will glad full if you can expose the context to the routes function handler.

Thank you in advance.

What does the proposed changes look like?

Add the request context to routes function handler call.

idea
1
assaffa
0
assaffa
commented 2 months ago

+1

0
Informations
Feature Request โ€ข Open
#c86 - Created 2 months ago