Bismillaahirrohmaanirrohiim…
berikut ini tambahan kode pada vhost nginx untuk memperbolehkan cors method options
{{settings}}
location / {
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin "https://namadomainfrontend.com" always;
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS" always;
add_header Access-Control-Allow-Headers "Content-Type, Authorization, X-Client-Session, X-Remember-Token, X-Referral-Code, X-App-Key, X-Client-Timezone, X-Client-Utc-Offset" always;
add_header Access-Control-Max-Age 86400 always;
add_header Content-Length 0 always;
return 204;
}
{{varnish_proxy_pass}}
proxy_set_header Host $host;
Demikian