[
https://issues.apache.org/jira/browse/FINERACT-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16599792#comment-16599792
]
Terence Denzil Monteiro edited comment on FINERACT-650 at 9/1/18 9:30 PM:
--------------------------------------------------------------------------
In my setup, Nginx is listening on actual IP port 443 and reverse proxy is
configured to Tomcat listening on 127.0.0.1 port 8080. It seems that Fineract
is using the 127.0.0.1 IP instead of the correct domain. Headers are set
properly in Nginx to forward the domain:
X-Real-IP, X-Forwarded-For, Host, X-Forwarded-Proto, X-Url-Scheme
In
/fineract-provider/src/main/java/org/apache/fineract/template/api/TemplatesApiResource.java:209,
(function mergeTemplate)
uriInfo.getBaseUri() is used to set BASE_URI. We need to ensure it is set
correctly.
was (Author: terencemo):
In my setup, Nginx is listening on actual IP port 443 and reverse proxy is
configured to Tomcat listening on 127.0.0.1 port 8080. It seems that Fineract
is using the 127.0.0.1 IP instead of the correct domain. Headers are set
properly in Nginx to forward the domain:
X-Real-IP, X-Forwarded-For, Host, X-Forwarded-Proto, X-Url-Scheme
In
/fineract-provider/src/main/java/org/apache/fineract/template/api/TemplatesApiResource.java:209,
UriInfo.getBaseUri() is used to set BASE_URI. We need to ensure it is set
correctly.
> Templates on multi-domain multi-tenant Setups call IP address
> -------------------------------------------------------------
>
> Key: FINERACT-650
> URL: https://issues.apache.org/jira/browse/FINERACT-650
> Project: Apache Fineract
> Issue Type: Bug
> Reporter: Terence Denzil Monteiro
> Priority: Major
>
> Setup fineract with multiple tenants, each with a different domain sharing a
> common IP address using a front-end server like Nginx or Apache, with reverse
> proxy to Tomcat. Setup also a default server when no domain is called (plain
> IP address).
> Create sample client / loan templates using client fields like displayName.
> The mapper shows as tenantIdentifier=default even for non-default tenants.
> Change it to the correct tenantIdentifier.
> Call the client / loan template and check the server logs.
> An entry will be found in the log for the template of the tenant and another
> entry will be found in the log for the default server (with plain IP). This
> shows that in order to generate the template, the application calls the
> mapper without using the correct domain with which the template was called. I
> tested this from the Community App and also used curl to call the API
> directly.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)