DEV Community

Cover image for # HTTPS Isn't Enough: 5 Security Header Mistakes
Vitalii Balint
Vitalii Balint

Posted on Edited on

# HTTPS Isn't Enough: 5 Security Header Mistakes

HTTPS Isn't Enough: 5 Security Header Mistakes

Having an SSL certificate is an important first step toward securing a website. But HTTPS alone doesn't guarantee that a web application is configured securely.

While working with Linux servers, Nginx, reverse proxies, and my website security audit project, SiteProbeLab, I've been focusing on practical HTTP security configuration issues.

Here are five mistakes worth checking.

1. HSTS Is Present but Effectively Disabled

Consider this HTTP response header:

Strict-Transport-Security: max-age=0

At first glance, HSTS is present. But max-age=0 actually tells the browser to remove the stored HSTS policy for that host after receiving the header over HTTPS.

A commonly used configuration is:

Strict-Transport-Security: max-age=31536000

A longer policy, with includeSubDomains, should only be enabled after verifying that every affected subdomain supports HTTPS properly.

Lesson: Check security header values, not just their presence.

2. Content Security Policy Is Too Permissive

Content Security Policy (CSP) helps reduce the impact of certain client-side attacks by controlling which resources the browser can load.

However, a policy that broadly permits external sources and unsafe inline scripts can weaken this protection.

For example, using script-src 'self' 'unsafe-inline' may allow inline script execution that a stricter policy would block.

A stronger approach is to design a policy around the application's actual dependencies, using nonces or hashes where appropriate.

CSP should be treated as defense in depth, not a replacement for secure application code.

3. Enforcing CSP Without Testing

A strict CSP can accidentally block legitimate JavaScript, fonts, analytics, or third-party integrations.

Before enforcing a new policy, test it with:

Content-Security-Policy-Report-Only: default-src 'self'; script-src 'self'

This example lets you evaluate the restrictions without enforcing them.

Review browser console violations, configure reporting if needed, and adjust the policy before switching to enforcement.

4. Missing Security Headers on Nginx Error Responses

This is an easy detail to overlook in Nginx configurations.

Consider:

add_header X-Content-Type-Options "nosniff";

Without the always parameter, Nginx adds this header only for certain HTTP response codes.

A more consistent configuration is:

add_header X-Content-Type-Options "nosniff" always;

Also check how add_header directives are inherited between http, server, and location blocks. A header defined at one level can disappear when additional headers are configured at a more specific level.

Recent Nginx versions provide additional inheritance controls, but you should verify the behavior of the version you're actually running.

5. Testing Only the Homepage

A website may return the expected security headers on /, but behave differently on:

  • API endpoints
  • Redirect responses
  • Error pages
  • Static resources
  • Responses delivered through a CDN

A simple starting point:

curl -sSI https://example.com/

Then test actual GET responses:

curl -sS -D - -o /dev/null https://example.com/api/health

curl -sS -D - -o /dev/null https://example.com/nonexistent-page

When using Cloudflare or another reverse proxy, inspect what the client actually receives, not only the origin server's configuration.

Remember that different resource types require different security controls. The absence of a browser-oriented header on a JSON API isn't automatically a vulnerability.

My Current Project: SiteProbeLab

I've recently released a dedicated Security Headers Checker as part of SiteProbeLab, my independent website security diagnostics project.

The tool helps website owners and system administrators identify common HTTP security header issues, including:

  • HTTP Strict Transport Security (HSTS) — identifying missing HSTS policies.
  • Content Security Policy (CSP) — detecting missing CSP configurations.
  • X-Content-Type-Options — checking for missing MIME-sniffing protection.
  • Referrer-Policy — identifying missing referrer disclosure policies.

The tool provides explanations and suggested remediation steps, while keeping broader website audit findings separate from security header results.

It uses the existing SiteProbeLab audit API and supports downloading findings in JSON format.

Try the free Security Headers Checker:

Run a Website Security Headers Check

No registration required. Enter a domain to review the findings.

The checker is designed as a practical first-pass diagnostic tool, not a replacement for a comprehensive penetration test or security assessment.

I also document my Linux infrastructure, cloud, DevOps, and security engineering projects at:

Technical portfolio:

https://ta551.info/

Final Thoughts

Security configuration isn't a one-time checkbox.

A reliable workflow should include:

  1. Reviewing HTTP response headers.
  2. Validating their actual values.
  3. Checking different application routes and response codes.
  4. Testing changes before enforcing restrictive policies.
  5. Rechecking configurations after deployments.

Security headers are valuable, but they are only one layer in a broader application security strategy.

How do you validate security headers in your deployment workflow?

I'd be interested in hearing about tools and approaches other developers and system administrators use.


Technical references

Top comments (8)

Collapse
 
aisovereign profile image
Ananya Soni •

Hi! Great breakdown on the Nginx header traps. Catching things like the always parameter inheritance and testing beyond just the homepage are super solid points that people always sleep on.

For validating headers in our deployment pipelines, we usually script automated checks right into our test runners rather than relying on manual spot checks. We run automated probes hitting health endpoints, error routes, and API paths right after deployment to verify that headers like HSTS and CSP stay locked down across all response codes, especially behind reverse proxies.

But seriously, as the founder and CEO of AGI Systems Directorate where we build AGI systems, autonomous AI agents, and robotics, I handle pretty much everything end-to-end since I'm full-stack, from core model development down to infrastructure security. I'm just curious, working in artificial general intelligence like this, what's your main focus day-to-day?

Collapse
 
vitaliibalint profile image
Vitalii Balint •

Thanks! I appreciate your perspective, especially around automated security validation in deployment pipelines.
My day-to-day focus is primarily on Linux infrastructure, cloud environments, DevOps automation, and cybersecurity.
Lately, I've been working on AI-assisted security monitoring, including a Wazuh-based SOC lab, local LLM integration, and automated incident analysis. I'm also exploring autonomous AI agents and ways to integrate them into real-world infrastructure and security workflows.
My main interest is bridging traditional systems engineering with practical AI automation — building reliable, secure, and scalable solutions.
It's interesting that you're working across AGI, autonomous agents, and robotics. What are some of the biggest technical challenges you're currently tackling?

Collapse
 
aisovereign profile image
Ananya Soni •

Appreciate that! Your stack with Wazuh, local LLMs, and automated incident analysis is proper solid, and securing agent workflows alongside infrastructure is basically the ultimate boss fight right now.

Most people treat this platform like a basic documentation diary, and honestly I used to do it too, but I am literally changing that now to actually find real builders and collaborators.

As for the biggest technical hurdles on our end, compute is obviously king. We have access to H200s, H100s, and TPUs, but the real bottleneck is optimization and utilization to keep models efficient on local hardware instead of just screaming on massive enterprise clusters. Beyond the silicon, we are tackling a brutal triple hybrid approach by integrating artificial intelligence, biological brain mechanisms, and physical robotics all together. Maintaining that entire architecture without everything breaking into a million pieces is proper brain-melting work.

Quick technical question on your end: when handling high throughput agent and system logs in your Wazuh setup, are you running stateful correlation rules dynamically in local memory, or offloading pattern matching to external vector stores?

But seriously, being a founder and CEO is not so easy.

Thread Thread
 
vitaliibalint profile image
Vitalii Balint •

Great technical question!
In my current Wazuh SOC lab, I'm primarily using Wazuh's native decoders and rule-based correlation for event detection, with OpenSearch handling indexing and log analysis.
I've also integrated a local Qwen AI model to assist with security alert analysis and structured JSON incident reporting.
I'm not currently using external vector stores for pattern matching. My approach is to keep deterministic detection within Wazuh and use AI as an additional analysis layer.
The environment is still experimental rather than production-scale, but I'm interested in exploring more advanced correlation and automated incident response.
And I definitely understand your point about being a founder and CEO. Building technology is one challenge; managing the business, people, and long-term vision is another.
I'm curious — how are you approaching agent observability and security monitoring in your AGI infrastructure?

Thread Thread
 
vitaliibalint profile image
Vitalii Balint •

One more technical question, Ananya.
I also looked at your AGI Systems Directorate project and noticed the references to a 136-modality architecture.
Do you have any publicly reproducible benchmarks or technical documentation demonstrating its actual capabilities?
I'm particularly interested in inference latency, throughput, hardware requirements, and how you evaluate cross-modal reasoning against established AI models.
Also, is the architecture currently running as an integrated system, or are some components still at the research and prototype stage?
I'd be genuinely interested in seeing the technical implementation and evaluation methodology.

Thread Thread
 
aisovereign profile image
Ananya Soni •

Appreciate the deep dive.

To answer your questions straight without dropping a massive whitepaper in the comments:

  1. Observability, Safety & Pipeline: Every autonomous agent goes through isolated sandbox testing with strict guardrails before anything hits production. Given what imploded across the industry earlier this year in July/August—I think you already know what that was—deploying raw agents without rigorous safety boundaries is basically asking for a live-fire incident. Once a model clears the sandbox, it moves straight to our custom internal 30-gate cognitive harness to stress-test against commercial frontier systems. Coincidentally, as I'm typing this, I'm actively reviewing a live run on that exact harness. On these internal anomaly stress-tests, standard frontier models like Gemini sit around 40% while our architecture hits 75%. Only after passing these internal gates do we initiate rollout.

  2. Release Workflow & 136-Modality Architecture (AETERNA_VOX_OMNI): The baseline sensory layers are fully integrated, but the multi-order paradox gates are still evolving in prototype. Because every architecture we build incorporates human brain replication mechanisms alongside hybrid robotics integration, it’s a heavy compute beast. But an AI company can't just go silent for 6 months or a year without shipping. To maintain fierce release momentum, we run parallel tracks and deploy in stages: first internally across company channels, then a polished public release once complete. That’s why agi-gauntlet already has versions live on PyPI, and Project Lumina is dropping this week. As for documentation, clean docs drop when the build is actually finished—not mid-execution. (If you want specific repo links or technical specs, just ask for the links).

  3. Hardware & Latency: Training runs on enterprise clusters with local H200 rigs, but edge and production deployments rely on aggressive quantization and optimization pipelines. Coming from roots where I built and managed architectures directly from a mobile phone, keeping inference latency ruthlessly low is an absolute baseline requirement for everything we ship.

Quick counter on your stack: since you're pairing Wazuh native decoders with local Qwen instances for log analysis, how are you handling context saturation when high-volume event spikes hammer your OpenSearch index?

Seriously though, I don't know what happened compared to yesterday—today has been absolute chaos. Between back-to-back executive meetings, board decisions, and the fact that I actually write the core code myself instead of just staring at slide decks like a corporate figurehead, today's workload is unreal. Good connecting with other devs actually building in the trenches, though.

Thread Thread
 
vitaliibalint profile image
Vitalii Balint •

Appreciate the detailed breakdown. The sandbox-first approach makes sense, especially given the agent containment incidents earlier this year.
On your OpenSearch question, I'm keeping the architecture deliberately lightweight and separating event detection from AI-assisted analysis.
In my current Wazuh 4.14.8 lab, native decoders and correlation rules handle the initial detection, while OpenSearch provides indexing and event retrieval. The local Qwen model is an additional analysis layer, not the primary detection engine.
For context saturation, my approach is to avoid feeding raw event streams directly into the LLM. Instead, I focus on retrieving relevant alerts and building bounded, structured context around them.
At higher event volumes, the next improvements would be alert deduplication, severity-based prioritization, time-window aggregation, and strict token budgets for AI analysis.
The important distinction is that OpenSearch indexing pressure and LLM context saturation are two separate scaling problems, and they need different controls.
My environment is still an experimental SOC lab rather than a production-scale deployment, so I'm careful not to overstate its capabilities.
Your AGI Gauntlet project sounds interesting. I found the PyPI release, and I'd be curious to look at the actual benchmark methodology behind the 75% versus 40% results.
Always good connecting with people who are actively building and testing real systems.

Thread Thread
 
aisovereign profile image
Ananya Soni •

Appreciate the breakdown on how you're splitting Wazuh detection from Qwen analysis. Quick technical follow-up on your event pipeline: when you're building bounded structured context for the LLM during a high-rate anomaly spike, are you handling stateful aggregation at the buffer layer using custom Lua scripts, or are you pushing sliding-window deduplication down into custom Wazuh decoders to prevent queue starvation before it even hits OpenSearch?

Also, just to clear up a quick mix-up on the benchmark side because my last comment was a bit compressed: the 75 percent versus 40 percent score isn't from the agi-gauntlet Python package. That's from our internal corporate anomaly stress harness. Agi-gauntlet is a completely different project on PyPI. It's an agnostic evaluation library where you can plug in any model you want with zero forced comparisons. Though, full disclosure, I am planning to launch a public leaderboard for it soon with a baseline score around 50 or 60.

Speaking of which, we are actually hosting an open contributor blind PR challenge for agi-gauntlet. Classic midnight idea while running on pure chaos, but evaluation tooling is honestly a mess across the industry right now, which is exactly why we spend months stress-testing everything before shipping public code.

Anyway, I have to get back to it because I am literally typing this reply right in the middle of an executive board meeting finalizing our robotics hardware structure. Good catching up with someone actually building real systems in the trenches.