nvitucci commented on a change in pull request #22: Add support for CORS
URL: https://github.com/apache/metamodel-membrane/pull/22#discussion_r289038453
##########
File path:
undertow/src/main/java/org/apache/metamodel/membrane/server/WebServer.java
##########
@@ -52,10 +53,12 @@ public static void main(final String[] args) throws
Exception {
final String portEnv = System.getenv("MEMBRANE_HTTP_PORT");
final int port = Strings.isNullOrEmpty(portEnv) ? DEFAULT_PORT :
Integer.parseInt(portEnv);
+ final String enableCorsEnv = System.getenv("ENABLE_CORS");
+ final boolean enableCors = !Strings.isNullOrEmpty(enableCorsEnv);
Review comment:
I'll rename the variable as `MEMBRANE_ENABLE_CORS` then. As for having it
enabled by default: since it's a security-related feature, it's up to you to
decide.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services