DEV Community

Krishna Modi
Krishna Modi

Posted on

3 1

Nginx with Brotli and ModSecurity

Are you using Docker for your next deployment?

How about web server? Nginx? Good choice!

But how do you manage security?

Docker is secured already? Myth! Wake up

Yes, you need to handle your own security, Docker ain't gonna do shit to help you secure things up with public accessibility to your endpoints.

Well, I recently bumped up into Nginx ModSecurity module and found it amazing.

It handles a ton of vulnerabilities and keeps your app secure from a major web and SQL vulnerabilities which otherwise were not handled by nginx default.

Also, Brotli is a much better compression offered by Google, gives 20% extra compression as compared to GZip.

Wow! isn't it? So how do you use this in your deployment?

It takes a lot of building and compiling and configuring to get this working. 15 mins of minimum build time guaranteed!

Don't worry, I've got your back and build a Docker image for you with all these together.

Try https://github.com/krish512/docker_nginx_modsecurity,

Latest Nginx with Modsecurity v3 and Brotli compression level 11

PS: Not really promoting my repo, just helping the community with my contribution and expecting PRs raised towards the repo to make it more feature-rich.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more