mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2025-10-24 01:39:08 +08:00
modify some bug
This commit is contained in:
@@ -34,6 +34,9 @@ public class TrustHostFilter implements Filter {
|
||||
@Override
|
||||
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
|
||||
String url = getSourceUrl(request);
|
||||
if(url != null){
|
||||
url = new String(Base64Utils.decodeFromString(url), StandardCharsets.UTF_8);
|
||||
}
|
||||
String host = getHost(url);
|
||||
if (host != null &&!ConfigConstants.getTrustHostSet().isEmpty() && !ConfigConstants.getTrustHostSet().contains(host)) {
|
||||
String html = this.notTrustHost.replace("${current_host}", host);
|
||||
|
Reference in New Issue
Block a user