package com.qianwen.core.context.props;
|
|
import java.util.ArrayList;
|
import java.util.Arrays;
|
import java.util.List;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
@ConfigurationProperties(BladeContextProperties.PREFIX)
|
/* loaded from: blade-core-context-9.3.0.0-SNAPSHOT.jar:org/springblade/core/context/props/BladeContextProperties.class */
|
public class BladeContextProperties {
|
public static final String PREFIX = "blade.context";
|
private Headers headers = new Headers();
|
|
public void setHeaders(final Headers headers) {
|
this.headers = headers;
|
}
|
|
public Headers getHeaders() {
|
return this.headers;
|
}
|
|
/* loaded from: blade-core-context-9.3.0.0-SNAPSHOT.jar:org/springblade/core/context/props/BladeContextProperties$Headers.class */
|
public static class Headers {
|
private String requestId = "Blade-RequestId";
|
private String accountId = "Blade-AccountId";
|
private String tenantId = "Blade-TenantId";
|
private List<String> allowed = Arrays.asList("X-Real-IP", "x-forwarded-for", "authorization", "Authorization", "Accept-Language", "accept-language", "Blade-Auth".toLowerCase(), "Blade-Auth");
|
|
public void setRequestId(final String requestId) {
|
this.requestId = requestId;
|
}
|
|
public void setAccountId(final String accountId) {
|
this.accountId = accountId;
|
}
|
|
public void setTenantId(final String tenantId) {
|
this.tenantId = tenantId;
|
}
|
|
public void setAllowed(final List<String> allowed) {
|
this.allowed = allowed;
|
}
|
|
public String getRequestId() {
|
return this.requestId;
|
}
|
|
public String getAccountId() {
|
return this.accountId;
|
}
|
|
public String getTenantId() {
|
return this.tenantId;
|
}
|
|
public List<String> getAllowed() {
|
return this.allowed;
|
}
|
}
|
|
public List<String> getCrossHeaders() {
|
List<String> headerList = new ArrayList<>();
|
headerList.add(this.headers.getRequestId());
|
headerList.add(this.headers.getAccountId());
|
headerList.add(this.headers.getTenantId());
|
headerList.addAll(this.headers.getAllowed());
|
return headerList;
|
}
|
}
|