I'm not sure what the intent is for (replace-last-interceptor) but it seems to aim to replace the built-in pedestal router with the reitit one instead.
However, it doesn't actually do that in the latest two versions of pedestal, because pedestal's routing interceptor is not at the end of the list:
The (replace-last-interceptor) call replaces the ::http/path-params-decoder interceptor instead.
(You can see the code which generates these here.)
Is there a better way to replace the pedestal router? Should I instead just leave the interceptor alone, add the reitit.pedestal/routing-interceptor to the end of my list of interceptors, and set the pedestal ::http/routes to []?
I'm not sure what the intent is for
(replace-last-interceptor)
but it seems to aim to replace the built-in pedestal router with the reitit one instead.However, it doesn't actually do that in the latest two versions of pedestal, because pedestal's routing interceptor is not at the end of the list:
The
(replace-last-interceptor)
call replaces the::http/path-params-decoder
interceptor instead.(You can see the code which generates these here.)
Is there a better way to replace the pedestal router? Should I instead just leave the interceptor alone, add the
reitit.pedestal/routing-interceptor
to the end of my list of interceptors, and set the pedestal::http/routes
to[]
?