From f759c65e660d6a9a18c4020ca4f94d05831f27a5 Mon Sep 17 00:00:00 2001 From: hendisantika Date: Sun, 10 Mar 2024 16:25:32 +0700 Subject: [PATCH] =?UTF-8?q?Enable=20GZip=20Compression=20=E2=9C=8F?= =?UTF-8?q?=EF=B8=8F=F0=9F=93=97=20:octocat:=20=F0=9F=90=B3=E2=AC=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application.yml | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 00f557d..c98cc1e 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -13,9 +13,9 @@ spring: format_sql: true flyway: enabled: true - check-location: true locations: classpath:/db/migration -# Templates reloading during development + fail-on-missing-locations: true + # Templates reloading during development thymeleaf: cache: false check-template: true @@ -36,17 +36,17 @@ spring: livereload: enabled: true add-properties: true - resources: - static-locations: file:src/main/resources/static/ - # static-locations: ${project.basedir}/src/main/resources/static/ - cache: - period: 0 servlet: multipart: max-file-size: 5MB max-request-size: 5MB enabled: true location: ${java.io.tmpdir} + web: + resources: + static-locations: file:src/main/resources/static/ + cache: + period: 0 #We can use the httpOnly and secure flags to secure our session cookie: # @@ -57,13 +57,18 @@ server: threads: max: 200 max-swallow-size: 2MB - max-http-post-size: 2MB - connection-timeout: 5s - max-http-header-size: 100KB + max-http-form-post-size: 2MB + connection-timeout: 5s servlet: session: cookie: http-only: true + max-http-request-header-size: 100KB + compression: + enabled: true + mime-types: application/json,application/xml,text/html,text/xml,text/plain + min-response-size: 1024 + excluded-user-agents: MSIE 6.0,UCBrowser # secure: true # 1 days = 1 * 24 * 60 * 60 @@ -73,4 +78,4 @@ cookie: #hendisantika/password -#admin/password \ No newline at end of file +#admin/password