OData behind reverse NGINX proxy
marc.kusters Nov 15, 2018 7:17 AMWe got the following situation; Our servers use NGINX as a SSL terminating reverse proxy in order to handle our SSL requests. Situation sketch:
Outside Interwebs 443 -> NGINX -> EAP/Teiid 8080
This works fine when accessing OData using a webbrowser. However when we use applications like Excel and PowerBI we can't get any data since they take the URL inside the odata feed which points to 127.0.0.1:8080.
Is there a way to solve this that would only affect our OData system.
I found the following blog but I'm unsure on how to proceed and if this will solve my predicament.
https://medium.com/red6-es/jboss-as7-eap-6-behind-an-ssl-terminating-reverse-proxy-6160a630a741
Example of our OData feed.
<a:feed xmlns:a="http://www.w3.org/2005/Atom" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:d="http://docs.oasis-open.org/odata/ns/data" m:context="$metadata#*********"> <a:id>http://127.0.0.1:8080/odata4/>*********</a:id> <a:entry> <a:id> http://127.0.0.1:8080/odata4/*********(emailType='*********',personIdExternal='*********') </a:id> <a:title/> <a:summary/> <a:updated>>*********</a:updated> <a:author> <a:name/> </a:author> <a:link rel="edit" href="http://127.0.0.1:8080/odata4/*********(emailType='*********',personIdExternal='*********')"/> <a:category scheme="http://docs.oasis-open.org/odata/ns/scheme" term="#*********"/> <a:content type="application/xml"> <m:properties> <d:emailType>*********</d:emailType> <d:personIdExternal>>*********</d:personIdExternal> <d:createdOn m:type="DateTimeOffset">>*********</d:createdOn> <d:isPrimary m:type="Boolean">>*********</d:isPrimary> <d:createdBy>>*********</d:createdBy> <d:lastModifiedBy>>*********</d:lastModifiedBy> <d:createdDateTime m:type="DateTimeOffset">>*********</d:createdDateTime> <d:emailAddress>>*********</d:emailAddress> <d:lastModifiedOn m:type="DateTimeOffset">>*********</d:lastModifiedOn> <d:lastModifiedDateTime m:type="DateTimeOffset">>*********</d:lastModifiedDateTime> </m:properties> </a:content> </a:entry> </a:feed>
Ofcourse http://127.0.0.1:8080 has to be the external URL.
Any help is welcome!