X-Powered-By

137 views
Skip to first unread message

adele.mo...@gmail.com

unread,
Oct 10, 2016, 11:11:07 PM10/10/16
to HAPI FHIR
Hi there,

I'm wondering if there's any option to disable adding "X-Powered-By" header to response? as far as I can see that is adding on the below method on RestfulServer;
 /**
     * This method is called prior to sending a response to incoming requests. It is used to add custom headers.
     * <p>
     * Use caution if overriding this method: it is recommended to call <code>super.addHeadersToResponse</code> to avoid
     * inadvertantly disabling functionality.
     * </p>
     */
    public void addHeadersToResponse(HttpServletResponse theHttpResponse) {
        theHttpResponse.addHeader("X-Powered-By", "HAPI FHIR " + VersionUtil.getVersion() + " RESTful Server");
    }

Thanks

James Agnew

unread,
Oct 11, 2016, 10:30:17 AM10/11/16
to adele.mo...@gmail.com, HAPI FHIR
Hi Adele,

That is indeed the method which adds the X-Powered-By header. You can certainly override it if you want, and disable that behaviour. At this point nothing else is added by that method.

Cheers,
James

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+unsubscribe@googlegroups.com.
To post to this group, send email to hapi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/0914a4d8-f9ab-4e8f-9cef-a41823c2cf62%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages