mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2026-03-15 21:53:46 +08:00
新功能点:支持base url配置(主要用于nginx反向代理等)
This commit is contained in:
@@ -23,6 +23,7 @@ public class ConfigConstants {
|
||||
private static String ftpPassword;
|
||||
private static String ftpControlEncoding;
|
||||
private static String fileDir = OfficeUtils.getHomePath() + File.separator + "file" + File.separator;
|
||||
private static String baseUrl;
|
||||
|
||||
public static Boolean isCacheEnabled() {
|
||||
return cacheEnabled;
|
||||
@@ -92,6 +93,15 @@ public class ConfigConstants {
|
||||
return fileDir;
|
||||
}
|
||||
|
||||
public static String getBaseUrl() {
|
||||
return baseUrl;
|
||||
}
|
||||
|
||||
public static void setBaseUrl(String baseUrl) {
|
||||
// 不以'/'结尾的,加上'/'
|
||||
ConfigConstants.baseUrl = baseUrl.concat("/");
|
||||
}
|
||||
|
||||
@Value("${file.dir:default}")
|
||||
public void setFileDir(String fileDir) {
|
||||
if (!"default".equals(fileDir)) {
|
||||
|
||||
Reference in New Issue
Block a user