Serve the SPA at /api-address/ from Caddy.
Exact prefix paths return index.html; other /api-address* routes still proxy to Django. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
c5c7e3753f
commit
423e7ad468
|
|
@ -11,6 +11,13 @@
|
||||||
file_server
|
file_server
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@spa path /{$URL_PREFIX:api-address} /{$URL_PREFIX:api-address}/
|
||||||
|
handle @spa {
|
||||||
|
root * /app/client
|
||||||
|
rewrite * /index.html
|
||||||
|
file_server
|
||||||
|
}
|
||||||
|
|
||||||
handle /{$URL_PREFIX:api-address}* {
|
handle /{$URL_PREFIX:api-address}* {
|
||||||
reverse_proxy 127.0.0.1:8001
|
reverse_proxy 127.0.0.1:8001
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue