Admin Page blank

System Information
  • Strapi Version: 4.3.4
  • Operating System: Ubuntu Server LTS, 20.04.3
  • Database: psql (PostgreSQL) 12.12 (Ubuntu 12.12-0ubuntu0.20.04.1)
  • Node Version: ">=v16.10.0
  • NPM Version: ">=7.24.0
  • Yarn Version:
  • Host: Digital Ocean

Hello, I encountered a strange problem with a blank admin page, first, I want to mention that I can get to the admin page from one browser and at the same time I cannot get from a new device or another browser to this admin page in production (if I luckily open in brave browser first, I cannot get to the admin page from chrome or firefox and also from another device). When I encounter a blank page, I get an error message in the console SyntaxError: Invalid or unexpected token (at main.1cb67290.js:2:26118) on the chrome browser.

with blank 200ok response

here is nginx config

server {
  # force https
  listen 80;
  server_name example.com;
  return 301 https://example.com$request_uri;
}
server {
    client_max_body_size 500M;
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_tokens off;
    server_name example.com;
    include snippets/ssl-params.conf;
    include snippets/common-add-headers.conf;

    location = /favicon.ico {
        log_not_found off;
        access_log off;
    }

    location / {
        proxy_pass http://localhost:1338;
        proxy_ssl_verify off;
        include snippets/common-proxy-headers.conf;
    }
}

common-proxy-headers.conf

proxy_set_header    X-Real-IP           $remote_addr;
proxy_set_header    X-Forwarded-For     $proxy_add_x_forwarded_for;
proxy_set_header    X-Forwarded-Proto   $scheme;
proxy_set_header    Host                $host;
proxy_set_header    X-Forwarded-Host    $host;
proxy_set_header    X-Forwarded-Port    $server_port;

common-add-headers.conf

add_header Strict-Transport-Security    "max-age=31536000; includeSubDomains" always;
add_header X-Frame-Options              SAMEORIGIN;
add_header X-Content-Type-Options       nosniff;
add_header X-XSS-Protection             "1; mode=block";

ssl-params.conf

ssl_protocols TLSv1.2; 
ssl_prefer_server_ciphers on; 
ssl_ciphers "*****"; 
ssl_ecdh_curve *****; 
ssl_session_timeout 10m; 
ssl_session_cache shared:SSL:10m; 
ssl_session_tickets off; 
ssl_stapling on;
ssl_stapling_verify on; 
ssl_dhparam *****; 
ssl_certificate *****;
ssl_certificate_key *****; 
resolver ***** valid=30; 
resolver_timeout 5s;

Uncaught SyntaxError: Invalid or unexpected token (at main.f878bb6e.js:2:26089) · Issue #13167 · strapi/strapi · GitHub same topic

but this is not solution of my problem

solution is declaratively and imperatively off cache on Claudflare(Cache level: Bypass)