Redirect Pages Request to Worker only if header is set
Hey,
Is there any way to redirect some request that are usually served by Pages to a Worker. I would like to select those request depending on if a HTTP header has a specific value.
I know I could use Worker Routes, but that would mean that all request would hit the worker, not only request with that header, which would be overkill since only a minority of request will actually include the header. In the best case it should not do an actual redirect, but just handle the request differently on the server side.
Thanks a lot in advance!
Is there any way to redirect some request that are usually served by Pages to a Worker. I would like to select those request depending on if a HTTP header has a specific value.
I know I could use Worker Routes, but that would mean that all request would hit the worker, not only request with that header, which would be overkill since only a minority of request will actually include the header. In the best case it should not do an actual redirect, but just handle the request differently on the server side.
Thanks a lot in advance!
