DHIS2 datawarehouse portal with dashboard widget not working

Hi Nicolay / Troyel,

I have been wondering if you or anyone else has managed to get to the root of the problem. We are developing a DHIS2 data warehouse public portal that inherits from the DHIS2 dashboard, to provide public access without the need to login among others.

The widget loads normally within the DHIS2 application, however, it refuses to display the customized dashboard widget app in a frame because it set ‘X-Frame-Options’ to ‘sameorigin’ when being displayed through the public portal (Error message).

P.s We are running DHIS2 version 2.33.

Any help to resolve this would be highly appreciated.

@austin and @jan could you please have a look at @baktash.salehi’s request?

Hi @baktash.salehi - as I understand it the current DHIS2 security policy for custom applications prevents them from being embedded on 3rd-party domains. Public portals are not officially supported, though they are a high priority for our next major release. You are welcome to open a Jira issue if you consider this a blocker for your use-case in the current released version of DHIS2.

As a work-around you should be able to modify the headers (removing x-frame-options) in the nginx reverse proxy which appears to be serving traffic to your DHIS2 instance (see this article for some pointers)

Hi,

Thank you @austin for prompt response, we are going to try the proposed solution.