|
|
|
@ -1,7 +1,9 @@
|
|
|
|
|
package com.java3y.austin.web.config;
|
|
|
|
|
|
|
|
|
|
import com.java3y.austin.web.interceptor.TokenInterceptor;
|
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
|
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
|
|
|
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
|
|
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -19,4 +21,9 @@ public class CrossConfig implements WebMvcConfigurer {
|
|
|
|
|
.maxAge(3600)
|
|
|
|
|
.allowedHeaders("*");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void addInterceptors(InterceptorRegistry registry) {
|
|
|
|
|
registry.addInterceptor(new TokenInterceptor()).addPathPatterns("/**");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|