Last active
March 12, 2024 16:26
-
-
Save jmhmd/43fe6d941a48d0c3ac441bc263c66190 to your computer and use it in GitHub Desktop.
Example pacsbin CORS nginx config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name dicomwebproxy.hospital.org; # set to desired address of proxy server | |
add_header 'Access-Control-Allow-Origin' 'pacsbin.com'; # Can set to '*' instead of 'pacsbin.com' to accept any domain | |
add_header 'Access-Control-Allow-Credentials' 'true'; | |
add_header 'Access-Control-Allow-Headers' '*'; | |
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS'; | |
location / { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Content-Length' 0; | |
return 204; | |
} | |
proxy_redirect off; | |
proxy_set_header host $host; | |
proxy_pass http://dhha-dicomweb-server-url.hospital.org; # address of dicomweb server base url | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment