Skip to content

Commit

Permalink
Add delete to OCL client
Browse files Browse the repository at this point in the history
  • Loading branch information
cintiadr committed Nov 28, 2018
1 parent 2ec20da commit 27f0970
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions ansible/host_vars/narok.openmrs.org/vars
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ nginx_vhosts:
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS, POST, PUT';
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS, POST, PUT, DELETE';
#
# Custom headers and headers various browsers *should* be OK with but aren't
#
Expand All @@ -94,17 +94,22 @@ nginx_vhosts:
return 204;
}
if ($request_method = 'POST') {
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS, POST, PUT';
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS, POST, PUT, DELETE';
add_header 'Access-Control-Allow-Headers' 'authorization,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
}
if ($request_method = 'PUT') {
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS, POST, PUT';
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS, POST, PUT, DELETE';
add_header 'Access-Control-Allow-Headers' 'authorization,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
}
if ($request_method = 'GET') {
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS, POST, PUT';
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS, POST, PUT, DELETE';
add_header 'Access-Control-Allow-Headers' 'authorization,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
}
if ($request_method = 'DELETE') {
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS, POST, PUT, DELETE';
add_header 'Access-Control-Allow-Headers' 'authorization,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
}
Expand Down

0 comments on commit 27f0970

Please sign in to comment.