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