Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpSession;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo
private Cookie createCookie(String key, String value) {
Cookie cookie = new Cookie(key, value);
cookie.setMaxAge(7 * 24 * 60 * 60);
// cookie.setSecure(true);
cookie.setSecure(true);
cookie.setPath("/");
cookie.setHttpOnly(true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ public SecurityFilterChain apiChain(HttpSecurity http) throws Exception {
.requestMatchers(
"/", "/refresh-token", "/h2-console/**",
"/favicon.ico", "/error",
"/swagger-ui/**", "/swagger-resources/**", "/v3/api-docs/**"
"/swagger-ui/**", "/swagger-resources/**", "/v3/api-docs/**",
"/test"
).permitAll()
.anyRequest().authenticated()
)
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,11 @@ front:
base-url: ${FRONT_BASE_URL}

server:
servlet:
session:
cookie:
same-site: none
secure: true

address: 0.0.0.0
port: 8080
Loading