Update Caddyfile
Browse files
Caddyfile
CHANGED
|
@@ -1,20 +1,21 @@
|
|
| 1 |
{
|
| 2 |
-
# Enable internal Admin API for dynamic route updates
|
| 3 |
admin localhost:2019
|
| 4 |
auto_https off
|
| 5 |
}
|
| 6 |
|
| 7 |
:7860 {
|
| 8 |
-
#
|
| 9 |
respond /status "Caddy Proxy Active" 200
|
| 10 |
|
| 11 |
-
# Route
|
| 12 |
handle /api/* {
|
| 13 |
reverse_proxy localhost:3000
|
| 14 |
}
|
| 15 |
|
| 16 |
-
#
|
| 17 |
-
handle
|
| 18 |
-
|
|
|
|
|
|
|
| 19 |
}
|
| 20 |
}
|
|
|
|
| 1 |
{
|
|
|
|
| 2 |
admin localhost:2019
|
| 3 |
auto_https off
|
| 4 |
}
|
| 5 |
|
| 6 |
:7860 {
|
| 7 |
+
# Better Stack keep-alive health check
|
| 8 |
respond /status "Caddy Proxy Active" 200
|
| 9 |
|
| 10 |
+
# Route backend REST requests to NestJS on port 3000
|
| 11 |
handle /api/* {
|
| 12 |
reverse_proxy localhost:3000
|
| 13 |
}
|
| 14 |
|
| 15 |
+
# Serve compiled React SPA static assets from the project subfolder
|
| 16 |
+
handle {
|
| 17 |
+
root * /app/projects/telegram-send-demo/frontend/dist
|
| 18 |
+
try_files {path} /index.html
|
| 19 |
+
file_server
|
| 20 |
}
|
| 21 |
}
|