mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: parameterized deprecated API support with SUPPORT_DEPRECATED_API
parent
683511ba27
commit
287fe79deb
|
@ -34,6 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
|
@ -229,6 +230,7 @@ public class OpenViduServer implements JsonRpcConfigurer {
|
|||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
@ConditionalOnProperty(name = "SUPPORT_DEPRECATED_API", havingValue = "true")
|
||||
public FilterRegistrationBean<ApiRestPathRewriteFilter> filterRegistrationBean() {
|
||||
FilterRegistrationBean<ApiRestPathRewriteFilter> registrationBean = new FilterRegistrationBean<ApiRestPathRewriteFilter>();
|
||||
ApiRestPathRewriteFilter apiRestPathRewriteFilter = new ApiRestPathRewriteFilter();
|
||||
|
|
|
@ -45,7 +45,8 @@ public class ApiRestPathRewriteFilter implements Filter {
|
|||
|
||||
@Override
|
||||
public void init(FilterConfig filterConfig) throws ServletException {
|
||||
log.info("Initializing API REST path rewrite filter");
|
||||
log.warn("Support for deprecated REST API paths enabled. Update your REST API clients to use the new paths");
|
||||
log.warn("Deprecated path support will be removed in a future version. You can disable old path support to test compatibility with property SUPPORT_DEPRECATED_API=false");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -8,6 +8,8 @@ server.ssl.key-alias=openvidu-selfsigned
|
|||
logging.level.root=info
|
||||
spring.main.allow-bean-definition-overriding=true
|
||||
|
||||
SUPPORT_DEPRECATED_API=true
|
||||
|
||||
DOTENV_PATH=.
|
||||
|
||||
DOMAIN_OR_PUBLIC_IP=
|
||||
|
|
Loading…
Reference in New Issue