hexo-server
hexo-server copied to clipboard
Add proxying support
This pull request implements two new hexo-serve
options that allow a user to proxy certain paths to a remote target. Useful for example to test API integrations when the API endpoints are called via relative URLs from the static part of the site.
Example
Assuming that you have your API deployment running locally on port 3001, the following command will proxy all URLs starting with /api
to localhost:3001
.
hexo serve -P /api -U http:localhost:3001/
Note: The proxied paths must not already exist in the static part of the site.