Closed Aaryan-kapur closed 4 years ago
Invalid, there are no CORS issues with the backend.
Instructions for CORS issue is still needed even on production but I don't know if it should be on Fineract or Mifos README. For those who still struggle with CORS, here's a template to solve it with an Nginx reverse proxy:
server {
server_name <FINERACT_DOMAIN>;
set $mifos_domain '<MIFOS_HOST>';
location / {
proxy_pass https://<FINERACT_HOST>;
proxy_set_header Host $host;
...
# Preflighted requests
if ($request_method = OPTIONS ) {
add_header 'Access-Control-Allow-Origin' $mifos_domain always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'fineract-platform-tenantid, Authorization, Origin, X-Requested-With, Content-Type, Accept' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
return 200;
}
}
}
There are no instructions to solve CORS problems