openMF / community-app

This was the former default web application built on top of the Apache Fineract platform. It's now deprecated and replaced by the the Mifos X Web App (https://github.com/openMF/web-app maintained by the Mifos Initiative as a reference solution for financial inclusion. It is a Single-Page App (SPA) written in web standard technologies.
http://openmf.github.io/community-app/
Mozilla Public License 2.0
313 stars 1.02k forks source link

CORS errors prevent running locally #3193

Open stdunbar opened 4 years ago

stdunbar commented 4 years ago

When running against an against a local server, CORS error prevent the application from doing anything.

Steps to Reproduce

  1. Checkout fineract 1.4.0 or develop branch from github.com/apache/fineract
  2. docker run --name mysql-5.5 -p 3306:3306 -e MYSQL_ROOT_PASSWORD=mysql -d mysql:5.5
  3. ./gradlew createDB -PdbName=fineract_tenants
  4. ./gradlew createDB -PdbName=fineract_default
  5. ./gradlew tomcatRunWAR
  6. Note that output is The Server is running at http://localhost:8080/fineract-provider
  7. Check out community-app, develop branch
  8. bower install
  9. npm install
  10. gem install bundler
  11. bundle install
  12. grunt serve
  13. Open browser, go to http://localhost:9002/?baseApiUrl=http://localhost:8080#/
  14. Login with user mifos, password password

Expected Behaviour

Login should work

Actual Behaviour

Login fails because of CORS error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://localhost:8080/fineract-provider/api/v1/authentication. (Reason: CORS request did not succeed).

Note that there is a CORS error and the protocol is ignored.

Settings

Screenshots

ravitejasrt commented 4 years ago

Hi am also faacing same error can you help me

Access to XMLHttpRequest at 'https://demo.openmf.org/fineract-provider/api/v1/authentication' from origin 'http://localhost:9002' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.

saifromeo commented 4 years ago

I am also facing similar issues, I checked out 18.x version community app, fineract 1.4 resulting in same error

Argez commented 3 years ago

Has anyone been able to solve this? I am also having the same error

musemby commented 3 months ago

Someone posted a solution here https://github.com/openMF/web-app/issues/706#issuecomment-2265208025