#2749 move constants

This commit is contained in:
Shinsuke Sugaya 2023-06-04 21:34:59 +09:00
parent 9edc268a96
commit 18aedb2d02
2 changed files with 12 additions and 10 deletions

View file

@ -20,6 +20,18 @@ import javax.servlet.ServletResponse;
public abstract class CorsHandler {
protected static final String ACCESS_CONTROL_ALLOW_ORIGIN = "Access-Control-Allow-Origin";
protected static final String ACCESS_CONTROL_ALLOW_HEADERS = "Access-Control-Allow-Headers";
protected static final String ACCESS_CONTROL_ALLOW_METHODS = "Access-Control-Allow-Methods";
protected static final String ACCESS_CONTROL_ALLOW_PRIVATE_NETWORK = "Access-Control-Allow-Private-Network";
protected static final String ACCESS_CONTROL_ALLOW_CREDENTIALS = "Access-Control-Allow-Credentials";
protected static final String ACCESS_CONTROL_MAX_AGE = "Access-Control-Max-Age";
public abstract void process(String origin, ServletRequest request, ServletResponse response);
}

View file

@ -25,16 +25,6 @@ import org.codelibs.fess.util.ComponentUtil;
public class DefaultCorsHandler extends CorsHandler {
protected static final String ACCESS_CONTROL_ALLOW_CREDENTIALS = "Access-Control-Allow-Credentials";
protected static final String ACCESS_CONTROL_MAX_AGE = "Access-Control-Max-Age";
protected static final String ACCESS_CONTROL_ALLOW_HEADERS = "Access-Control-Allow-Headers";
protected static final String ACCESS_CONTROL_ALLOW_METHODS = "Access-Control-Allow-Methods";
protected static final String ACCESS_CONTROL_ALLOW_ORIGIN = "Access-Control-Allow-Origin";
@PostConstruct
public void register() {
final CorsHandlerFactory factory = ComponentUtil.getCorsHandlerFactory();