提交 4276652a 编写于 作者: misaka's avatar misaka

SaaS header srforgid

上级 dfecbff9
......@@ -117,5 +117,5 @@ zuul:
</#if>
<#comment>通过设置该参数,避免Zuul转发请求时丢失Authorization请求头信息</#comment>
sensitive-headers:
- Cookie,Set-Cookie,Authorization
- Cookie,Set-Cookie,Authorization<#if sys.getSaaSMode()==4>,srforgid</#if>
</#if>
<#ibiztemplate>
TARGET=PSSYSTEM
</#ibiztemplate>
<#if sys.getSaaSMode()==4>
package ${pub.getPKGCodeName()}.config;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
import com.netflix.zuul.exception.ZuulException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class DevBootHeaderFilter extends ZuulFilter {
@Override
public String filterType() {
return "pre";
}
@Override
public int filterOrder() {
return 0;
}
@Override
public boolean shouldFilter() {
return true;
}
@Override
public Object run() throws ZuulException {
RequestContext ctx = RequestContext.getCurrentContext();
ctx.addZuulRequestHeader("srfsystem", "${sys.getCodeName()}");
return null;
}
}
</#if>
\ No newline at end of file
......@@ -127,5 +127,5 @@ zuul:
</#if>
<#comment>通过设置该参数,避免Zuul转发请求时丢失Authorization请求头信息</#comment>
sensitive-headers:
- Cookie,Set-Cookie,Authorization
- Cookie,Set-Cookie,Authorization<#if sys.getSaaSMode()==4>,srforgid</#if>
</#if>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册