/
Enable CORS in mGramSeva services

Enable CORS in mGramSeva services

Overview

We can not access API's when API’s hosted domain is different from the UI domain. To resolve this issue we will enable cors in the service for a specific domain, e.g. we have two services that are hosted in mGramSeva and DIGIT-UI is hosted in iFix.

Configuration

For any service, cors is default false, for enabling the cors add the following configuration in the environment

{service-name}: ingress: cors: enabled: true annotations: nginx.ingress.kubernetes.io/cors-allow-origin: {origin-url}

e.g. for mGramSeva QA added in deploy-as-code/helm/environments/mgramseva-qa.yaml

adapter-master-data-service: ingress: cors: enabled: true annotations: nginx.ingress.kubernetes.io/cors-allow-origin: "https://ifix-qa.ifix.org.in" ifix-department-entity-service: ingress: cors: enabled: true annotations: nginx.ingress.kubernetes.io/cors-allow-origin: "https://ifix-qa.ifix.org.in"

 

Note - After adding the configuration deploy the service again.

 

Related content

Deployment of iFix Digit-UI
Deployment of iFix Digit-UI
More like this
DIGIT-UI (Dashboard) for iFix
DIGIT-UI (Dashboard) for iFix
More like this
Promotion Guide: A step by step approach to deploy and configure services for migrating to new dashboard
Promotion Guide: A step by step approach to deploy and configure services for migrating to new dashboard
Read with this
DIGIT Multi-Tenant traffic routing strategy
DIGIT Multi-Tenant traffic routing strategy
More like this
iFix Filter
Read with this
DIGIT Multi-Tenant traffic routing strategy
DIGIT Multi-Tenant traffic routing strategy
More like this