38 lines
864 B
Caddyfile
38 lines
864 B
Caddyfile
:3000
|
|
|
|
encode zstd gzip
|
|
|
|
# ── Facebook OAuth2 microserver (Node.js en puerto 3002) ──────────────────────
|
|
handle /fb-server/* {
|
|
uri strip_prefix /fb-server
|
|
reverse_proxy localhost:3002
|
|
}
|
|
|
|
# ── yt-dlp stream extractor (servicio externo configurable via env) ───────────
|
|
handle /yt-stream/* {
|
|
uri strip_prefix /yt-stream
|
|
reverse_proxy {env.YTDLP_HOST}
|
|
}
|
|
|
|
# OAuth2 callback page — must be served as a static HTML (not the SPA index)
|
|
handle /oauth2callback {
|
|
rewrite * /oauth2callback.html
|
|
file_server {
|
|
root /ui/build
|
|
}
|
|
}
|
|
|
|
# Facebook OAuth2 callback popup
|
|
handle /oauth/facebook/callback.html {
|
|
file_server {
|
|
root /ui/build
|
|
}
|
|
}
|
|
|
|
# SPA — serve static files, fallback to index.html for client-side routing
|
|
handle {
|
|
root * /ui/build
|
|
try_files {path} /index.html
|
|
file_server
|
|
}
|