Re: 'host' configuration param not used by servlet

2016-11-11 Thread Pontus Ullgren
I agree with Jonas original comment. Since camel-swagger-java allows for explicitly setting a hostname it should have precedence over the hostname taken from the servlet context (regardless if it in turn is taken from 'X-Forwarded-Host' or 'Host'). @Jonas: I would suggest that you log a Jira with

Re: 'host' configuration param not used by servlet

2016-11-10 Thread Vitalii Tymchyshyn
In Tomcat you can add https://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/valves/RemoteIpValve.html Ср, 2 лист. 2016 о 13:51 Jonas Koperdraat пише: > Hi Zoran, > > I've checked and the proxy sets the 'X-Forwarded-Host' header and this > contains the 'correct' host. The 'Host' header

Re: 'host' configuration param not used by servlet

2016-11-02 Thread Jonas Koperdraat
Hi Zoran, I've checked and the proxy sets the 'X-Forwarded-Host' header and this contains the 'correct' host. The 'Host' header is also present on the request and this contains the hostname of the actual machine the servlet is running on. I'm not sure if we have the option to set it, but seeing as

Re: 'host' configuration param not used by servlet

2016-11-02 Thread Zoran Regvart
Hi Jonas, On Wed, Nov 2, 2016 at 4:25 PM, Jonas Koperdraat wrote: > I don't know whether that header is being sent by the proxy. Should that > impact the behavior I am seeing (e.g. should does that influence the result > of getRequestURL)? It does on some Servlet engines / middlewares, it might

Re: 'host' configuration param not used by servlet

2016-11-02 Thread Jonas Koperdraat
Hi Zoran, I don't know whether that header is being sent by the proxy. Should that impact the behavior I am seeing (e.g. should does that influence the result of getRequestURL)? I was considering a filter that alters the resulting swagger documentation, but a filter that overrides getRequestURL i

Re: 'host' configuration param not used by servlet

2016-11-02 Thread Zoran Regvart
Hi Jonas, On Wed, Nov 2, 2016 at 2:57 PM, Jonas Koperdraat wrote: > It seems to me that this is a bug, but I might be mistaken, Is anyone > else familiar with this problem and aware of a solution/workaround? is your proxy sending the X-Forwarded-Host header to the servlet engine (watchout for To

'host' configuration param not used by servlet

2016-11-02 Thread Jonas Koperdraat
I have a REST API for which I am exposing a swagger definitiion using camel-swagger-java. The application is deployed behind a proxy, because of which I need to change host used in the generated swagger documentation. Currently, the internal hostname of the actual machine is being used, based on th