This commit is contained in:
2025-01-25 13:55:47 +02:00
parent 9803a4c6c3
commit 703166f71e

View File

@@ -156,27 +156,27 @@ http {
# Web Api
location / {
# Handle preflight OPTIONS requests
if ($request_method = OPTIONS ) {
# Add CORS headers for preflight request
add_header 'Access-Control-Allow-Origin' 'https://app.mzansi-innovation-hub.co.za' always;
# add_header 'Access-Control-Allow-Credentials' 'true' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Access-Control-Max-Age' 1728000;
return 204;
}
# if ($request_method = OPTIONS ) {
# # Add CORS headers for preflight request
# add_header 'Access-Control-Allow-Origin' 'https://app.mzansi-innovation-hub.co.za' always;
# # add_header 'Access-Control-Allow-Credentials' 'true' always;
# add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
# add_header 'Access-Control-Allow-Headers' '*';
# add_header 'Access-Control-Max-Age' 1728000;
# return 204;
# }
add_header 'Access-Control-Allow-Origin' 'https://app.mzansi-innovation-hub.co.za' always;
# add_header 'Access-Control-Allow-Credentials' 'true' always;
# add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always
add_header 'Access-Control-Allow-Headers' '*';
# add_header 'Access-Control-Allow-Origin' 'https://app.mzansi-innovation-hub.co.za' always;
# # add_header 'Access-Control-Allow-Credentials' 'true' always;
# # add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always
# add_header 'Access-Control-Allow-Headers' '*';
proxy_pass http://MIH-AI:11434/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
}
location ~ /.well-known/acme-challenge/ {