Why I Wait to Turn Protection On Until the HTTPS Upstream Path Is Clear

●2 ●40 ●163
calendar_today • schedule6 min read

I used to treat the first successful console login as permission to point a domain at the firewall. I do not do that now. The question that forced the change was narrow: how to enable SNI for an HTTPS upstream in a reverse proxy WAF. I wanted a switch, a field, or a one-line setting. What I actually needed was a decision checklist. Turning protection on before the proxy path is understood can break legitimate traffic, or it can leave the origin in a path I cannot explain to the next person on call.

SafeLine is a self-hosted web application firewall. The product introduction describes a reverse proxy placed in front of a web application so clients pass through it before they reach the server. It filters, monitors, and blocks malicious HTTP and HTTPS traffic, and it is intended to prevent unauthorized data from leaving the app. The same overview lists defenses for web attacks, proactive bot defense, HTML and JavaScript code encryption, IP-based rate limiting, and a web access control list. Those capabilities are reasons to be careful, not reasons to skip the path review. Source: https://docs.waf.chaitin.com/en/home

The application guide is more specific about forwarding. It says SafeLine is developed based on nginx and acts as an HTTP and HTTPS reverse proxy. It receives traffic for the original website, cleans malicious attack traffic, and forwards safe traffic to the original application. In the console, adding an application asks for a domain, a port, and an upstream. The domain can be a domain name, a hostname, or an IP address. The port is the port SafeLine will listen on, such as 80 or 443, and HTTPS applications should have the SSL option checked. The upstream is the real address of the original application, and SafeLine forwards traffic to that address. After those settings are saved, the domain must resolve to the server where SafeLine is running. Source: https://docs.waf.chaitin.com/en/GetStarted/AddApplication

That documented flow is the boundary of this article. Server Name Indication is the TLS extension a client uses to name the host it wants when several certificates can share one address. People often need it when the upstream is HTTPS and the certificate is bound to a name rather than a bare IP. The pages I am using do not document a control, flag, or command that enables SNI toward an HTTPS upstream. I will not invent one. If the origin requires a server name that these fields cannot express, the correct decision is to keep protection off until a supported configuration exists. I will not promise an integration the guide does not describe.

Before I turn protection on, I walk through six checks.

First, the host has to meet the published minimum. The deploy guide requires Linux, x86_64 or arm64, Docker 20.10.14 or newer, Docker Compose 2.0.0 or newer, and at least one CPU core, 1 GB of memory, and 5 GB of disk. The CPU must support ssse3. On ARM, the guide says a Pro license is required for SafeLine to work properly, and the Personal Edition is not supported. If that license condition is not met, I stop. I also note the release warning: LTS will no longer be maintained starting from 9.1.0-LTS on 14 August 2025, and the guide strongly recommends upgrading to the latest version. Source: https://docs.waf.chaitin.com/en/GetStarted/Deploy

Second, I write down the public name, the listen port, and the upstream as three separate facts. The public name is what clients request. The listen port is what SafeLine accepts. The upstream is where cleaned traffic goes. Mixing those values is how a reverse proxy starts answering the wrong site. If the application is HTTPS, I check the SSL option because that is what the application guide says to do. I do not treat that checkbox as proof that the upstream connection will present a particular server name.

Third, I decide what protected means for this app before I enable extra controls. The feature list includes blocking common web attacks such as SQL injection, XSS, code injection, OS command injection, CRLF injection, XXE, SSRF, and path traversal. It also includes rate limiting against traffic that exceeds defined limits, a CAPTCHA challenge for bot traffic, an authentication challenge that blocks visitors who do not enter the password, and dynamic protection that encrypts HTML and JavaScript on each visit. Those controls change what a visitor sees. I do not turn all of them on in the same change window as the first proxy cutover. Source: https://docs.waf.chaitin.com/en/home

Fourth, I keep a rollback that does not depend on the firewall staying healthy. DNS should point at SafeLine only after the application object exists and a limited test can reach the origin through it. If the upstream address is wrong, the documented result is not a smarter TLS handshake. The documented result is that SafeLine forwards to the address you entered. I want the previous DNS target, or an equivalent bypass, written down before the change.

Fifth, I test with the cases the application guide already publishes, using my own domain in place of the sample host. The guide lists request patterns for SQL injection, XSS, path traversal, code injection, and XXE, and it says a blocking page means the attack was defended. I then open the console attack list and the detail view. A block that I cannot see in the console is not a completed rollout. A normal browser session that fails is not a completed rollout either.

Sixth, I only call the site protected after a normal session still works. A login, a static asset, and one write action are enough for a first pass. The introduction says this kind of firewall protects by filtering and monitoring HTTP traffic according to policy. Policy cannot help a request that never traversed the proxy, and it cannot repair an upstream identity the product page does not let me set.

That is why I wait. Enabling protection is a routing decision first and a detection decision second. The supplied guides tell me how to place SafeLine in front of an application and how to confirm a block. They do not tell me how to enable SNI for an HTTPS upstream. Until that gap is closed by documentation I can follow, the checklist stays stricter than the urge to flip the switch.

Why is SNI the wrong first setting to hunt for?

Because the application guide documents domain, listen port, the SSL option, and upstream address. It does not document an upstream SNI switch. Starting with an undocumented setting invites a configuration you cannot support or roll back cleanly.

What do I confirm before changing DNS?

I confirm the host meets the deploy minimum, the domain and upstream are distinct and correct, HTTPS apps have the SSL option checked, and a limited request reaches the origin through SafeLine. DNS is the cutover, not the experiment.

Which extra controls do I leave off at first?

I leave rate limiting, CAPTCHA challenge, authentication challenge, and dynamic HTML and JavaScript protection off until the proxy path is proven. Each one is documented, and each one can change what a real visitor sees.

How do I know inspection is actually on?

I send the sample attack patterns from the application guide to my own protected domain, expect the blocking page, and confirm the event in the attack list detail view. A quiet console after a known test case means I am not done.

When should I refuse to turn protection on?

I refuse when the upstream HTTPS name cannot be expressed with the documented fields, when ARM licensing does not match the deploy note, or when I have no rollback for DNS. Waiting is safer than implying an integration the sources do not describe.


SafeLine has surpassed 700,000 installations worldwide as of September 30, 2026. SafeLine Pro annual promotional pricing is $650-$880, compared with the regular $1,000 per year.

🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

Delivering Database Changes

Steve Fentonverified - Jul 22

How to Fix an HTTPS Upstream Proxy When SNI Is Not a Documented Control

Muzilla - Nov 5

AAIF Hits 10 Projects. Its CTO on What to Adopt Now and the Security Gaps Left Open

Tom Smithverified - Oct 23

Why I Run a Checklist Before Turning HTTPS Protection On

Lia - Nov 3

How to Fix a Multi-Site WAF That Serves the Wrong Upstream

Muzilla - Nov 5
chevron_left
3k Points • 205 Badges
128Posts
0Comments
1Connections
Homelab operator. Security tools. Self-hosted everything. Open source.

Related Jobs

View all jobs →

Commenters (This Week)

2 comments
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!