package com.ruoyi.cms.util;

import javax.servlet.http.HttpServletRequest;

public class ProxyServerUtil {
    private static final String PROXY_HEADER = "X-Proxy-Server";

    /**
     * 从请求头中获取代理服务器标识（B或C）
     * @param request HttpServletRequest
     * @return 代理标识（如"proxy-b"、"proxy-c"），无则返回null
     */
    public static String getProxyServer(HttpServletRequest request) {
        // 从请求头中获取自定义标识
        return request.getHeader(PROXY_HEADER);
    }
}