Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
main: register net/http/pprof on reloads too
We didn't need to in the past as we layered the routers, meaning that we never fully replaced the main router. Now that we do, we must set it up. Otherwise, its routes will be 404s after any reload. Do it in loadAPIEndpoints, since it is run in the same scenarios and we want to put the pprof stuff in the control router anyway, since it's Tyk's endpoint and not the user's. Add a test too, ensuring that it survives reloads and that it won't be on the non-control router. Also a small file closing fix.
- Loading branch information
Showing
3 changed files
with
31 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters