mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-04 13:49:57 -05:00
Allowing CORS from Controller :8087 to API to know when first repair has completed.
This commit is contained in:
parent
ebac4fdfa2
commit
bfaf1514da
2 changed files with 18 additions and 1 deletions
|
|
@ -45,6 +45,23 @@ http {
|
||||||
ssl_certificate /etc/nginx/cert.crt;
|
ssl_certificate /etc/nginx/cert.crt;
|
||||||
ssl_certificate_key /etc/nginx/cert.key;
|
ssl_certificate_key /etc/nginx/cert.key;
|
||||||
|
|
||||||
|
# CORS headers for Controller direct access (http://host:8087 -> https://host/api)
|
||||||
|
# Added at server level so they apply to error pages (502, etc.)
|
||||||
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||||
|
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always;
|
||||||
|
add_header 'Access-Control-Allow-Headers' 'Content-Type, Accept' always;
|
||||||
|
|
||||||
|
# Override http-level error_page to use named location with CORS
|
||||||
|
error_page 502 503 504 @error_with_cors;
|
||||||
|
|
||||||
|
location @error_with_cors {
|
||||||
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||||
|
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always;
|
||||||
|
add_header 'Access-Control-Allow-Headers' 'Content-Type, Accept' always;
|
||||||
|
root /var/www;
|
||||||
|
try_files /50x.html =502;
|
||||||
|
}
|
||||||
|
|
||||||
include /etc/nginx/conf.d/*;
|
include /etc/nginx/conf.d/*;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
0.17.4-beta
|
0.17.5-beta
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue