This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Based on: https://docs.spring.io/spring-boot/docs/2.1.3.RELEASE/reference/htmlsingle/#boot-features-error-handling | |
*/ | |
package com.myorg.myproject.controller.advice | |
import org.springframework.http.HttpStatus | |
import org.springframework.web.bind.annotation.ExceptionHandler | |
import org.springframework.web.bind.annotation.RestControllerAdvice | |
import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class OidcConfig { | |
@Bean | |
public GrantedAuthoritiesMapper authoritiesMapper() { | |
return new GrantedAuthoritiesMapper() { | |
@Override | |
public Collection<? extends GrantedAuthority> mapAuthorities(Collection<? extends GrantedAuthority> authorities) { | |
return authorities; | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on https://serverfault.com/questions/291703/dynamic-backends-with-haproxy/292581#292581 | |
server { | |
listen 80; | |
server_name *.localtest.me; | |
#charset koi8-r; | |
#access_log /var/log/nginx/host.access.log main; | |
resolver 127.0.0.11; |