I have two different domains for client and server.
My server(actually a REST API) runs with Spring security and below is my code for security configuration