what is exactly your setup?
I think you have a tomcat and in front of that you have another firewall/proxy server?
And that proxy server talks to tomcat by tomcats internal ip?
Problem is that when you serve files to the browser we need to make it a full absolute url
what we do then is get the request url of tomcat (so the incoming url) and prepend that in front of the relative url (that points to that pdf)
But if you have a proxy/firewall server in front of this that talks to the tomcat server through its local ip then tomcat gives us that and we prepend the local ip
The thing is that the proxy/firewall should rewrite this. There should be rewrite rules somewhere where it sees certain ip adresses in the responses it should rewrite it to the public one.
the biggest problem here that it is not really a http header or a real redirect
Because this url is in the content, its in an ajax request that looks like this (you can see this in the chrome network inspector)
- Code: Select all
<?xml version="1.0" encoding="UTF-8"?><ajax-response><evaluate><![CDATA[Servoy.HTMLEdit.removeInvalidEditors();]]></evaluate><evaluate><![CDATA[storeValueAndCursorBeforeUpdate();]]></evaluate><evaluate><![CDATA[setValidationFailed(null);]]></evaluate><evaluate><![CDATA[restoreValueAndCursorAfterUpdate();]]></evaluate><evaluate><![CDATA[setStatusText('Ready');]]></evaluate><evaluate><![CDATA[showurl('http://localhost:8080/servoy-webclient/resources/servoy/resources',0,false,true,false);]]></evaluate><evaluate><![CDATA[clearDoubleClickId('id5')]]></evaluate></ajax-response>
there you see that "showurl" that has in my example localhost:8080
So currently you have to have some rewrite rull that rewrites that too the public ip...
We could if needed do this rewrite maybe in servoy, where you then say in a property on the admin page what the public ip should be.
Or maybe this is also set in the headers somehow where we could potentally extract it (not sure if that is always the case)