401 HTTP Origin: Network OSI layer 7 · Application Last updated 18 Nov 2026

401 because the Authorization header is stripped

The client sends credentials, but a proxy, CGI/FastCGI setup or redirect removes the Authorization header before your app sees it.

Exact message you may see Authorization header not receivedAuthorization header strippedHTTP_AUTHORIZATION not set401 Unauthorized Authorization header missing in PHPgetallheaders Authorization missing
Seen on: HTTP Apache PHP Nginx

Meaning

Apache with PHP-FPM/CGI drops it unless you pass it through; redirects to another host also strip it by design. Add a rewrite rule to forward the header, use proxy_set_header Authorization $http_authorization, and avoid cross-origin redirects for authenticated calls.

Common causes

  • Apache CGI/FastCGI not forwarding Authorization
  • Proxy not passing the header
  • Cross-origin redirect stripping credentials
  • CDN rule removing headers
  • Header name filtered by WAF

⚡ Quick fix

  1. Apache: RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  2. nginx: proxy_set_header Authorization $http_authorization;
  3. Call the final URL, not a redirecting one

Detailed fix by platform

Apache

  1. apache
    RewriteEngine On
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

How to diagnose

  1. App sees header — No?
  2. Proxy — Forwards it?
  3. Redirect — Cross-origin?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Network. Errors that are often confused with or caused by this one (click to open):

203 — HTTP 203 Non-Authoritative Information (HTTP)203307 — HTTP 307 Temporary Redirect (HTTP)307401 — HTTP 401 Unauthorized (HTTP)401401 — 401 Unauthorized without WWW-Authenticate header (HTTP)401401 — 401 Bearer error="invalid_token" (HTTP)401401 — Browser keeps asking for username and password (Basic auth prompt loop) (HTTP)401403 — HTTP 403 Forbidden (HTTP)403403 This action is unauthorized — Laravel: Illuminate\Auth\Access\AuthorizationException: This action is unauthorized. (Laravel)403 This action is un…401

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.