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
Instead of one fixed "api prefix", we now allow an array of prefixes.
If one prefix matches the current request path the request will
be dispatched as an api request early in the WP loading cycle.
Fix: snicco#164
Instead of one fixed "api prefix", we now allow an array of prefixes.
If one prefix matches the current request path the request will
be dispatched as an api request early in the WP loading cycle.
Fix: snicco#164
Thanks for taking the time to fill out this feature request!"
Which @snicco/* package(s) are relevant/related of the feature request?
http-routing-bundle
Description
Currently, the
HttpKernelRunner
class takes a single "api" prefix to determine if a route should be loaded early.It would be good to allow multiple distinct prefixes from acting as "API" routes that should be loaded early in the WP loading process.
I.E.
/my-plugin/rest-api
/my-plugin/pages
Proposed solution
Change the constructor arguments of
HttpKernelRunner
to acceptstring|string[]
Alternatives
Currently the above is only possible by structuring URLs like so:
/my-plugin/EARLY/rest-api
/my-plugin/EARLY/pages
(
EARLY
is some shared "sub" prefix that is currently needed")The text was updated successfully, but these errors were encountered: