You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Boydens Joeri (OZ)" <jo...@oz.be> on 2010/01/28 16:43:30 UTC

@RequireHttps with reverse proxy

Hi,

 

We have a wicket application running at the following address
http://myserver.domain.be:8082/myapplication.  When I do add the
@RequiredHttps annotation to my pages, wicket does a great job
redirecting my pages to https connection.  I get something like:

https://myserver.domain.be:8443/myapplication/somepage .

 

So far so good, but now I have to serve this application behind a
reverse proxy.  I have apache httpd2 set up with ProxyPass, and I added
a VirtualHost for my application, something like
http://myapplication.domain.be (this way port 8082 isn't visible and
/myapplication context path isn't visible either).

 

This is working perfectly for non https pages, but when I go to a https
pages, I get redirected to the server application address
(https://myserver.domain.be:8843/myapplication).  This is because the
SwitchProtocolRequestTarget is building the redirect url based on the
httpservletrequest.getServerName()...

 

Is it possible to extend/override this behavior ?

 

Regards

Joeri

 

 

 

 


Re: @RequireHttps with reverse proxy

Posted by Igor Vaynberg <ig...@gmail.com>.
if you need to solve it now then simply copy and paste the code for
the request processor and customize it

-igor

On Fri, Jan 29, 2010 at 7:08 AM, Boydens Joeri (OZ) <jo...@oz.be> wrote:
> I've created an issue for it, but how could I solve it for now ?
>
> Any hints/tips where to start ?
>
> Thanks
>
> -----Oorspronkelijk bericht-----
> Van: Igor Vaynberg [mailto:igor.vaynberg@gmail.com]
> Verzonden: vrijdag 29 januari 2010 4:21
> Aan: users@wicket.apache.org
> Onderwerp: Re: @RequireHttps with reverse proxy
>
> add an rfe to our jira
>
> -igor
>
> On Thu, Jan 28, 2010 at 7:43 AM, Boydens Joeri (OZ) <jo...@oz.be> wrote:
>> Hi,
>>
>>
>>
>> We have a wicket application running at the following address
>> http://myserver.domain.be:8082/myapplication.  When I do add the
>> @RequiredHttps annotation to my pages, wicket does a great job
>> redirecting my pages to https connection.  I get something like:
>>
>> https://myserver.domain.be:8443/myapplication/somepage .
>>
>>
>>
>> So far so good, but now I have to serve this application behind a
>> reverse proxy.  I have apache httpd2 set up with ProxyPass, and I added
>> a VirtualHost for my application, something like
>> http://myapplication.domain.be (this way port 8082 isn't visible and
>> /myapplication context path isn't visible either).
>>
>>
>>
>> This is working perfectly for non https pages, but when I go to a https
>> pages, I get redirected to the server application address
>> (https://myserver.domain.be:8843/myapplication).  This is because the
>> SwitchProtocolRequestTarget is building the redirect url based on the
>> httpservletrequest.getServerName()...
>>
>>
>>
>> Is it possible to extend/override this behavior ?
>>
>>
>>
>> Regards
>>
>> Joeri
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: @RequireHttps with reverse proxy

Posted by "Boydens Joeri (OZ)" <jo...@oz.be>.
I've created an issue for it, but how could I solve it for now ?

Any hints/tips where to start ?

Thanks

-----Oorspronkelijk bericht-----
Van: Igor Vaynberg [mailto:igor.vaynberg@gmail.com] 
Verzonden: vrijdag 29 januari 2010 4:21
Aan: users@wicket.apache.org
Onderwerp: Re: @RequireHttps with reverse proxy

add an rfe to our jira

-igor

On Thu, Jan 28, 2010 at 7:43 AM, Boydens Joeri (OZ) <jo...@oz.be> wrote:
> Hi,
>
>
>
> We have a wicket application running at the following address
> http://myserver.domain.be:8082/myapplication.  When I do add the
> @RequiredHttps annotation to my pages, wicket does a great job
> redirecting my pages to https connection.  I get something like:
>
> https://myserver.domain.be:8443/myapplication/somepage .
>
>
>
> So far so good, but now I have to serve this application behind a
> reverse proxy.  I have apache httpd2 set up with ProxyPass, and I added
> a VirtualHost for my application, something like
> http://myapplication.domain.be (this way port 8082 isn't visible and
> /myapplication context path isn't visible either).
>
>
>
> This is working perfectly for non https pages, but when I go to a https
> pages, I get redirected to the server application address
> (https://myserver.domain.be:8843/myapplication).  This is because the
> SwitchProtocolRequestTarget is building the redirect url based on the
> httpservletrequest.getServerName()...
>
>
>
> Is it possible to extend/override this behavior ?
>
>
>
> Regards
>
> Joeri
>
>
>
>
>
>
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: @RequireHttps with reverse proxy

Posted by Igor Vaynberg <ig...@gmail.com>.
add an rfe to our jira

-igor

On Thu, Jan 28, 2010 at 7:43 AM, Boydens Joeri (OZ) <jo...@oz.be> wrote:
> Hi,
>
>
>
> We have a wicket application running at the following address
> http://myserver.domain.be:8082/myapplication.  When I do add the
> @RequiredHttps annotation to my pages, wicket does a great job
> redirecting my pages to https connection.  I get something like:
>
> https://myserver.domain.be:8443/myapplication/somepage .
>
>
>
> So far so good, but now I have to serve this application behind a
> reverse proxy.  I have apache httpd2 set up with ProxyPass, and I added
> a VirtualHost for my application, something like
> http://myapplication.domain.be (this way port 8082 isn't visible and
> /myapplication context path isn't visible either).
>
>
>
> This is working perfectly for non https pages, but when I go to a https
> pages, I get redirected to the server application address
> (https://myserver.domain.be:8843/myapplication).  This is because the
> SwitchProtocolRequestTarget is building the redirect url based on the
> httpservletrequest.getServerName()...
>
>
>
> Is it possible to extend/override this behavior ?
>
>
>
> Regards
>
> Joeri
>
>
>
>
>
>
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org