This article describes how to implement a proxy solution for Visualize.js when browsers are blocking all third-party cookies. There are several possible configurations of proxies and domains or subdomains, depending on your needs. You can deploy the proxy solution using the provided configuration files as a starting point.
Background
Apple has decided to block all third-party cookies in Safari, and Google will soon do the same for Chrome. The similar situation with Mozilla Firefox and Microsoft Edge. This issue impacts Jaspersoft customers that have web applications implementing Visualize.js deployed on one domain and JasperReports Server located on another domain or subdomains.
When users access your web app using Visualize.js, the script needs to store a cookie with a session information for JasperReports Server. However, browsers will no longer allow this cookie because JasperReports Server is on a different domain (or subdomain), and it is considered a third-party cookie.
Proxy Solution Workaround
As a short-term solution, Jaspersoft recommends introducing an additional proxy server (similar to a load balancer) so that client (browser) will think that your instance of JasperReports Server appears to be on the same domain (or subdomain) as the Vizualize js web app. The proxy makes the server cookies appear to be from the same (sub)domain and thus allowed by browsers. This configuration is shown in the following diagram:
Proxy Servers
You can use any web server, proxy server, or load balancer that can be configured to respond in one domain and forward to another domain. Install the proxy server on a physical or virtual machine that is configured to be in the same domain as your web app. It can be on a separate instance that has access to the webapp and backend hostnames, and it proxy forwards where needed.
Optionally, the proxy can also be installed in a sub-domain of the app’s domain, for example: backend.mywebapp.com.
Apache HTTP Server Configuration
Configure your Apache HTTP Server as a proxy with the following contents in the file /etc/httpd/conf.d/jrs-https.conf:
Nginx Web Server Configuration
Configure your Nginx web server as a proxy with the following contents in the file nginx-ssl.conf:
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now