mirror of https://github.com/halo-dev/halo
Disable open in view feature of jpa
parent
4b7df3286f
commit
59ecc132b3
|
@ -62,6 +62,7 @@ public class SwaggerConfiguration {
|
|||
@Bean
|
||||
public Docket haloDefaultApi() {
|
||||
log.debug("Doc disabled: [{}]", haloProperties.getDocDisabled());
|
||||
// TODO Build with different security configuration
|
||||
return buildApiDocket("run.halo.app.portal.api",
|
||||
"run.halo.app.web.controller.portal.api",
|
||||
"/api/**")
|
||||
|
@ -71,6 +72,7 @@ public class SwaggerConfiguration {
|
|||
@Bean
|
||||
public Docket haloAdminApi() {
|
||||
log.debug("Doc disabled: [{}]", haloProperties.getDocDisabled());
|
||||
// TODO Build with different security configuration
|
||||
return buildApiDocket("run.halo.app.admin",
|
||||
"run.halo.app.web.controller.admin",
|
||||
"/admin/api/**")
|
||||
|
@ -119,7 +121,7 @@ public class SwaggerConfiguration {
|
|||
private SecurityContext securityContext() {
|
||||
return SecurityContext.builder()
|
||||
.securityReferences(defaultAuth())
|
||||
.forPaths(PathSelectors.regex("/api/.*"))
|
||||
.forPaths(PathSelectors.regex("/admin/api/.*"))
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -110,6 +110,7 @@ public class AdminAuthenticationFilter extends OncePerRequestFilter {
|
|||
if (StringUtils.isNotBlank(token)) {
|
||||
|
||||
// Valid the token
|
||||
// TODO Add key prefix
|
||||
Optional<String> userDetailOptional = cacheStore.get(token);
|
||||
|
||||
if (!userDetailOptional.isPresent()) {
|
||||
|
|
|
@ -38,6 +38,7 @@ spring:
|
|||
hibernate:
|
||||
ddl-auto: update
|
||||
show-sql: true
|
||||
open-in-view: false
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 10MB
|
||||
|
|
|
@ -40,6 +40,7 @@ spring:
|
|||
hibernate:
|
||||
ddl-auto: update
|
||||
show-sql: false
|
||||
open-in-view: false
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 10MB
|
||||
|
|
Loading…
Reference in New Issue