All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.yes.tools.parser.HeaderRequestOriginParser Maven / Gradle / Ivy

There is a newer version: 2.0.6
Show newest version
package org.yes.tools.parser;

import com.alibaba.csp.sentinel.adapter.spring.webmvc.callback.RequestOriginParser;
import jakarta.servlet.http.HttpServletRequest;

/**
 * sentinel 请求头解析判断
 *
 * @author Co.
 * @date 2023/10/24 10:24
 */
public class HeaderRequestOriginParser implements RequestOriginParser {

	/**
	 * 请求头获取allow
	 */
	private static final String ALLOW = "Allow";

	/**
	 * Parse the origin from given HTTP request.
	 * @param request HTTP request
	 * @return parsed origin
	 */
	@Override
	public String parseOrigin(HttpServletRequest request) {
		return request.getHeader(ALLOW);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy