Serve pre-compressed static file through Payara Web Server

51 views
Skip to first unread message

Amit Bansal

unread,
Jan 23, 2021, 3:29:53 PM1/23/21
to Payara Forum

I am using Webpack to bundle the static files(CSS/JS) and generating both the .css/.js and .css.gz/.js.gz files. Using these files I am creating a WAR file which I am deploying on the Payara Server.

The server is only serving uncompressed static files and not the pre-compressed static files.

I tried configuring the Payara web server for gzip compression but it is again compressing the static files and not using the already compressed static files. This is putting load on the CPU for every request.

I want to avoid compressing on every request. What configurations are required to make the web-server use the already compressed static files and not waste CPU cycles in again compressing the normal static files?

PS: Found configuration to achieve the same in Apache webserver but unable to achieve the same in Payara webserver

Reply all
Reply to author
Forward
0 new messages