Browse Source

删除跨域设置

hejq 7 years ago
parent
commit
2471e12405
1 changed files with 0 additions and 27 deletions
  1. 0 27
      src/main/java/com/uas/ps/inquiry/CorsConfig.java

+ 0 - 27
src/main/java/com/uas/ps/inquiry/CorsConfig.java

@@ -1,27 +0,0 @@
-package com.uas.ps.inquiry;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.web.servlet.config.annotation.CorsRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
-
-/**
- * @author liusw
- * @version 2018/1/23 16:53
- */
-@Configuration
-public class CorsConfig extends WebMvcConfigurerAdapter {
-
-    /**
-     * 跨域问题
-     * @param registry
-     */
-    @Override
-    public void addCorsMappings(final CorsRegistry registry) {
-        registry.addMapping("/**")
-                .allowedOrigins("*")
-                .allowCredentials(true)
-                .allowedMethods("GET", "POST", "DELETE", "PUT")
-                .maxAge(3600);
-    }
-
-}