I'm using Ngnix the following configuration :
upstream sync {
server couchbase-sync:4984;
}
server {
listen 4984;
server_name ${WEBAPP_HOST};
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' '*';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
location / {
if ($request_method = OPTIONS) {
return 204;
}
proxy_pass http://sync;
}
}
I do not want to redirect OPTIONS requests but I have a error :
nginx_1 | 2017/01/20 09:23:40 [emerg] 9#9: invalid condition "=" in /etc/nginx/conf.d/webapp.conf:13
nginx_1 | nginx: [emerg] invalid condition "=" in /etc/nginx/conf.d/webapp.conf:13
How do I solve my problem? Official Doc
Thank you for reading