    server {
        listen       6656;
        server_name  localhost;

        
	
        location / {
            root   tokensearch/;
            index  index.html index.htm;
        }
		# 修改API路径，去掉/api前缀或调整为匹配前端请求的路径
		location /api/ {
        # 代理到后端服务器，注意这里去掉了/api前缀
			proxy_pass http://localhost:3000/api/;
			# 添加必要的代理头信息
			proxy_set_header Host $host;
			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;
		}
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        } 
       
    }