mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-22 16:10:40 +07:00
chore(deploy): auth-protected /api/content/ proxy with Gitea token passthrough
nginx template location with basic auth (deploy/htpasswd) + envsubst'd GITEA_TOKEN; compose mounts template + htpasswd; vite dev proxy mirrors nginx exactly for edit-mode development.
This commit is contained in:
1 parent
e6b4d83084
commit
f113dfc7b5
4 files changed
+47
-1
No files matched your search
+14
@@ -38,4 +38,18 @@ server {
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
}
|
||||
|
||||
# Content write path (spec-v4 §6.2): Basic-auth at the proxy, the Gitea
|
||||
# write token lives only in the container environment (${GITEA_TOKEN} is
|
||||
# substituted by the image's envsubst template step — the SPA bundle never
|
||||
# carries a write-capable token).
|
||||
location /api/content/ {
|
||||
auth_basic "Editor";
|
||||
auth_basic_user_file /etc/nginx/htpasswd;
|
||||
|
||||
proxy_pass https://code.vugado.com/api/v1/repos/dong.nguyen/cv/contents/;
|
||||
proxy_ssl_server_name on;
|
||||
proxy_set_header Host code.vugado.com;
|
||||
proxy_set_header Authorization "token ${GITEA_TOKEN}";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user