1. My Caddy version (caddy -version
):
Caddy v1.0.4 (h1:wwuGSkUHo6RZ3oMpeTt7J09WBB87X5o+IZN4dKehcQE=)
2. How I run Caddy:
As of now bare cmd run
caddy.exe --conf Caddyfile
a. System environment:
Windows 8
d. My complete Caddyfile:
As of now it is
localhost:80
root PATH_TO_MY_INDEX file
proxy /api localhost:8081
3. The problem I’m having:
From the internet the application will be server on example.com and I want to allow the Vue application to make API calls to example.com/api while the API is actually served at localhost:8081
The real question, after how to accomplish this is to preserve the requested uri, as example.com/api/myresource should be mapped to localhost:8081/myresource bringing with it all the path and query parameters
5. What I already tried:
I am fiddling with proxy and rewrite mods without wrapping my head around how to accomplish this