mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: add trailing slash to all system path properties
parent
2d64569392
commit
d0c1d5346b
|
@ -228,10 +228,6 @@ public class OpenviduConfig {
|
|||
return this.openviduRecordingPath;
|
||||
}
|
||||
|
||||
public void setOpenViduRecordingPath(String recordingPath) {
|
||||
this.openviduRecordingPath = recordingPath;
|
||||
}
|
||||
|
||||
public boolean getOpenViduRecordingPublicAccess() {
|
||||
return this.openviduRecordingPublicAccess;
|
||||
}
|
||||
|
@ -240,10 +236,6 @@ public class OpenviduConfig {
|
|||
return this.openviduRecordingCustomLayout;
|
||||
}
|
||||
|
||||
public void setOpenViduRecordingCustomLayout(String recordingCustomLayout) {
|
||||
this.openviduRecordingCustomLayout = recordingCustomLayout;
|
||||
}
|
||||
|
||||
public String getOpenViduRecordingVersion() {
|
||||
return this.openviduRecordingVersion;
|
||||
}
|
||||
|
@ -804,6 +796,7 @@ public class OpenviduConfig {
|
|||
File f = new File(stringPath);
|
||||
f.getCanonicalPath();
|
||||
f.toURI().toString();
|
||||
stringPath = stringPath.endsWith("/") ? stringPath : (stringPath + "/");
|
||||
return stringPath;
|
||||
} catch (Exception e) {
|
||||
addError(property, "Is not a valid file system path. " + e.getMessage());
|
||||
|
@ -828,6 +821,7 @@ public class OpenviduConfig {
|
|||
throw new Exception(
|
||||
"OpenVidu Server does not have permissions to write on path " + f.getCanonicalPath());
|
||||
}
|
||||
stringPath = stringPath.endsWith("/") ? stringPath : (stringPath + "/");
|
||||
return stringPath;
|
||||
} catch (Exception e) {
|
||||
addError(property, "Is not a valid writable file system path. " + e.getMessage());
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package io.openvidu.server.cdr;
|
||||
package io.openvidu.server.resources;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
@ -33,7 +33,6 @@ public class CDRHttpHandler implements WebMvcConfigurer {
|
|||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
String cdrPath = openviduConfig.getOpenviduCdrPath();
|
||||
cdrPath = cdrPath.endsWith("/") ? cdrPath : cdrPath + "/";
|
||||
registry.addResourceHandler("/cdr/**.log").addResourceLocations("file:" + cdrPath);
|
||||
}
|
||||
|
|
@ -41,9 +41,6 @@ public class RecordingCustomLayoutsResourceHandler implements WebMvcConfigurer {
|
|||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
String customLayoutsPath = openviduConfig.getOpenviduRecordingCustomLayout();
|
||||
customLayoutsPath = customLayoutsPath.endsWith("/") ? customLayoutsPath : customLayoutsPath + "/";
|
||||
openviduConfig.setOpenViduRecordingCustomLayout(customLayoutsPath);
|
||||
|
||||
registry.addResourceHandler("/layouts/custom/**").addResourceLocations("file:" + customLayoutsPath);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,12 +38,7 @@ public class RecordingsResourceHandler implements WebMvcConfigurer {
|
|||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
|
||||
String recordingsPath = openviduConfig.getOpenViduRecordingPath();
|
||||
recordingsPath = recordingsPath.endsWith("/") ? recordingsPath : (recordingsPath + "/");
|
||||
|
||||
openviduConfig.setOpenViduRecordingPath(recordingsPath);
|
||||
|
||||
registry.addResourceHandler("/recordings/**").addResourceLocations("file:" + recordingsPath);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue