Jhonton Chen 336e68a9d7
Some checks failed
Pro-CI-CD-Pipeline / build-and-deploy (push) Has been cancelled
'...'
2026-04-08 10:43:20 +08:00
2026-04-08 10:43:20 +08:00
2026-04-07 20:16:40 +08:00
2026-04-07 14:23:09 +08:00
2026-04-07 14:23:09 +08:00
2026-04-08 10:02:22 +08:00
2026-04-07 14:23:09 +08:00
2026-04-08 10:02:22 +08:00
2026-04-07 14:23:09 +08:00
2026-04-07 22:04:40 +08:00
2026-04-07 20:16:40 +08:00
2026-04-07 20:16:40 +08:00
2026-04-07 14:23:09 +08:00
2026-04-07 14:23:09 +08:00
2026-04-07 14:23:09 +08:00

Risk-Guard

This project is a secondary development based on the Alibaba open-source template Ant Design Pro, which uses React, UmiJS, Ant Design and other technology stacks.

Install Dependencies

Install node_modules:

pnpm i

Or install dependencies using yarn or npm.

Start the Project

pnpm start

Build the Project

pnpm build

More Information

You can view the complete documentation at the official website.

Since the project routing uses history mode, nginx configuration is required, otherwise refreshing the page will result in 404 errors. Additionally, since SSE interfaces are used, some special configurations are also needed.

server {
    listen 80;
    # server_name your-domain.com;

    # Security headers
    add_header X-Frame-Options "SAMEORIGIN" always;
    add_header X-Content-Type-Options "nosniff" always;
    add_header X-XSS-Protection "1; mode=block" always;

    root /data/react;
    index index.html;

    # Homepage negotiation cache
    location = /index.html {
        add_header Cache-Control "no-cache";
    }

    # Static resources
    location ~* \.(?:js|css|woff2?|eot|ttf|svg|ico|png|jpg|jpeg|gif|webp)$ {
        gzip on;
        gzip_min_length 10k;
        gzip_types application/javascript text/plain application/x-javascript text/css application/xml text/javascript;
        gzip_comp_level 6;
        expires 1d;
        add_header Cache-Control "public, immutable";
    }

    # SPA routing
    location / {
        try_files $uri $uri/ /index.html;
    }

    # SSE interface
    location = /api/sse/connect {
        proxy_http_version 1.1;
        proxy_set_header Connection '';
        proxy_set_header Cache-Control "no-transform";
        proxy_set_header X-Accel-Buffering "no";
        proxy_buffering off;
        proxy_read_timeout 86400s;

        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_set_header X-Forwarded-Proto $scheme;

        # Path rewriting
        rewrite ^/api(/.*)$ $1 break;

        proxy_pass http://127.0.0.1:8090;
    }

    # API proxy
    location /api/ {
        # Path rewriting
        rewrite ^/api(/.*)$ $1 break;

        gzip on;
        gzip_types application/json;
        gzip_comp_level 6;

        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_set_header X-Forwarded-Proto $scheme;

        proxy_pass http://127.0.0.1:8090;


    }
}
Description
No description provided
Readme 2.1 MiB
Languages
TypeScript 96.5%
JavaScript 2.8%
Less 0.7%