最近的一些修改 #7

Merged
xiaohai2271 merged 37 commits from dev into master 2020-08-01 21:26:46 +08:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit f375def613 - Show all commits

View File

@@ -26,7 +26,7 @@ public class CorsConfig {
config.addAllowedOrigin("https://celess.cn"); config.addAllowedOrigin("https://celess.cn");
config.addAllowedOrigin("https://www.celess.cn"); config.addAllowedOrigin("https://www.celess.cn");
// 本地调试时的跨域 // 本地调试时的跨域
if ("dev".equals(activeModel)) { if (!"prod".equals(activeModel)) {
config.addAllowedOrigin("http://localhost:4200"); config.addAllowedOrigin("http://localhost:4200");
config.addAllowedOrigin("http://127.0.0.1:4200"); config.addAllowedOrigin("http://127.0.0.1:4200");
} }

View File

@@ -26,7 +26,7 @@ public class SwaggerConfig {
@Bean @Bean
public Docket createRestApi() { public Docket createRestApi() {
return new Docket(DocumentationType.SWAGGER_2) return new Docket(DocumentationType.SWAGGER_2)
.enable("dev".equals(environment)) .enable(!"prod".equals(environment))
.apiInfo(apiInfo()) .apiInfo(apiInfo())
.select() .select()
.apis(RequestHandlerSelectors.basePackage("cn.celess.blog")) .apis(RequestHandlerSelectors.basePackage("cn.celess.blog"))