-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Greetings,
I am intending to utilize this module for conditional proxy purposes. In order to branch according to the expected accept:
header in the request, I wrote a function in the pathFilter as follows:
pathFilter: (path, req) => accepts(req).types(['json', 'html']) === 'json'
Using custom matching in the pathFilter is well-explained in the http-proxy-middleware documentation:
https://github.com/chimurai/http-proxy-middleware#pathfilter-string-string-glob-glob-function
However, due to an attempt to serialize the options as JSON in the source code at https://github.com/wobsoriano/nuxt-proxy/blob/main/src/module.ts#L35, my approach does not function as anticipated. Is there a better way to preserve the original options during the process of generating virtual source code?
Metadata
Metadata
Assignees
Labels
No labels