Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] X-FRAME Header option

Great!  Thanks so much, I already have filters so that should be easy.

Ike



From:        Simone Bordet <sbordet@xxxxxxxxxxx>
To:        JETTY user mailing list <jetty-users@xxxxxxxxxxx>,
Date:        02/19/2013 04:47 AM
Subject:        Re: [jetty-users] X-FRAME Header option
Sent by:        jetty-users-bounces@xxxxxxxxxxx




Hi,

On Tue, Feb 19, 2013 at 4:54 AM, Ike Ikonne <iikonne@xxxxxxxxxx> wrote:
> Hi all,
>
> We embed Jetty with our application, I would like to know how I could tell
> the Jetty server to include the X-FRAME option in all responses to the
> client. Would this piece of code do the trick?
>
> import org.eclipse.jetty.server.Server
>
> Server server = new Server();
> server.setAttribute("X-Frame-Options", "SAMEORIGIN");

Setting an attribute in the server will not affect the responses.
Instead, write a Servlet Filter that sets header you want in the responses.

--
Simone Bordet
----
http://cometd.org
http://webtide.com
http://intalio.com
Developer advice, training, services and support
from the Jetty & CometD experts.
Intalio, the modern way to build business applications.
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users



Back to the top