How to add custom headers in CXF RS service response ?

Solution Verified - Updated -

Issue

  • How to add custom headers in CXF RS service response ?
  • Observed that the APIs response did not contain all necessary headers needed according to the best security practices. Used HTTP4 in the API invocation. X-Frame-Options, X-XSS-Protection, X-Content-Type-Options, Set-Cookie Security flag missing.

Environment

  • Red Hat Fuse
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content