SUPPORT-8653 fix csrf cookie name
This commit is contained in:
parent
84854640e7
commit
b30948f427
3 changed files with 14 additions and 2 deletions
|
|
@ -59,6 +59,8 @@ public class SecurityConfig {
|
|||
|
||||
protected void httpConfigure(HttpSecurity httpSecurity) throws Exception {
|
||||
CookieCsrfTokenRepository tokenRepository = CookieCsrfTokenRepository.withHttpOnlyFalse();
|
||||
tokenRepository.setCookieName(TokenConstants.CSRF_TOKEN_NAME);
|
||||
tokenRepository.setHeaderName(TokenConstants.CSRF_HEADER_NAME);
|
||||
tokenRepository.setCookiePath("/");
|
||||
XorCsrfTokenRequestAttributeHandler delegate = new XorCsrfTokenRequestAttributeHandler();
|
||||
delegate.setCsrfRequestAttributeName(null);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
package ru.micord.ervu.security;
|
||||
|
||||
public final class TokenConstants {
|
||||
public static String CSRF_TOKEN_NAME = "XSRF-TOKEN-LKRP-UL";
|
||||
public static String CSRF_HEADER_NAME = "X-XSRF-TOKEN-LKRP-UL";
|
||||
|
||||
private TokenConstants() {
|
||||
//must be empty
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
export class TokenConstants {
|
||||
public static readonly CSRF_TOKEN_NAME = "XSRF-TOKEN";
|
||||
public static readonly CSRF_HEADER_NAME = "X-XSRF-TOKEN";
|
||||
public static readonly CSRF_TOKEN_NAME = "XSRF-TOKEN-LKRP-UL";
|
||||
public static readonly CSRF_HEADER_NAME = "X-XSRF-TOKEN-LKRP-UL";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue