ph-enable-cors (#209)
Co-authored-by: Peter Hormanns <peter.hormanns@jalin.de> Reviewed-on: https://dev.hostsharing.net/hostsharing/hs.hsadmin.ng/pulls/209 Reviewed-by: Peter Hormanns <peter.hormanns@hostsharing.net>
This commit is contained in:
@@ -21,6 +21,7 @@ public class HsadminNgApplication {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addCorsMappings(CorsRegistry registry) {
|
public void addCorsMappings(CorsRegistry registry) {
|
||||||
|
// TODO: to enable testing, we should use Spring config
|
||||||
String allowedOrigins = System.getenv("ALLOWED_ORIGINS");
|
String allowedOrigins = System.getenv("ALLOWED_ORIGINS");
|
||||||
if (allowedOrigins == null || allowedOrigins.length() <= 1) {
|
if (allowedOrigins == null || allowedOrigins.length() <= 1) {
|
||||||
allowedOrigins = "*";
|
allowedOrigins = "*";
|
||||||
|
|||||||
Reference in New Issue
Block a user