feat: Phase 6, Device provisioning and deployment of updates on git-pull
This commit is contained in:
@@ -15,6 +15,18 @@ http {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
# OTA firmware files — allow browser (esptool-js) to fetch .bin files directly
|
||||
location /ota/ {
|
||||
root /srv;
|
||||
add_header Access-Control-Allow-Origin "*";
|
||||
add_header Access-Control-Allow-Methods "GET, OPTIONS";
|
||||
add_header Access-Control-Allow-Headers "Authorization, Content-Type";
|
||||
if ($request_method = OPTIONS) {
|
||||
add_header Access-Control-Max-Age 3600;
|
||||
return 204;
|
||||
}
|
||||
}
|
||||
|
||||
# API requests → FastAPI backend
|
||||
location /api/ {
|
||||
proxy_pass http://backend;
|
||||
|
||||
Reference in New Issue
Block a user