Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick CORS changes from master to 7.3.x #14952

Merged
merged 1 commit into from
Oct 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@
import org.eclipse.che.api.workspace.server.spi.provision.env.MachineTokenEnvVarProvider;
import org.eclipse.che.api.workspace.server.spi.provision.env.MavenOptsEnvVariableProvider;
import org.eclipse.che.api.workspace.server.spi.provision.env.ProjectsRootEnvVariableProvider;
import org.eclipse.che.api.workspace.server.spi.provision.env.WorkspaceAgentCorsAllowCredentialsEnvVarProvider;
import org.eclipse.che.api.workspace.server.spi.provision.env.WorkspaceAgentCorsAllowedOriginsEnvVarProvider;
import org.eclipse.che.api.workspace.server.spi.provision.env.WorkspaceAgentCorsEnabledEnvVarProvider;
import org.eclipse.che.api.workspace.server.spi.provision.env.WorkspaceAgentJavaOptsEnvVariableProvider;
import org.eclipse.che.api.workspace.server.spi.provision.env.WorkspaceIdEnvVarProvider;
import org.eclipse.che.api.workspace.server.spi.provision.env.WorkspaceNameEnvVarProvider;
Expand Down Expand Up @@ -180,14 +177,6 @@ protected void configure() {
.addBinding()
.to(WorkspaceAgentJavaOptsEnvVariableProvider.class);

legacyEnvVarProviderMultibinders
.addBinding()
.to(WorkspaceAgentCorsAllowedOriginsEnvVarProvider.class);
legacyEnvVarProviderMultibinders
.addBinding()
.to(WorkspaceAgentCorsAllowCredentialsEnvVarProvider.class);
legacyEnvVarProviderMultibinders.addBinding().to(WorkspaceAgentCorsEnabledEnvVarProvider.class);

bind(org.eclipse.che.api.workspace.server.event.WorkspaceJsonRpcMessenger.class)
.asEagerSingleton();
bind(org.eclipse.che.everrest.EverrestDownloadFileResponseFilter.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ protected void configureServlets() {
private boolean isCheCorsEnabled() {
String cheCorsEnabledEnvVar = System.getenv("CHE_CORS_ENABLED");
if (cheCorsEnabledEnvVar == null) {
// by default CORS should be enabled
return true;
// by default CORS should be disabled
return false;
} else {
return Boolean.valueOf(cheCorsEnabledEnvVar);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -685,20 +685,13 @@ che.core.jsonrpc.minor_processor_queue_capacity=10000
che.metrics.port=8087

# CORS settings
# CORS filter on WS Master is turned on by default.
# Use environment variable "CHE_CORS_ENABLED=false" to turn it off
# CORS filter on WS Master is turned off by default.
# Use environment variable "CHE_CORS_ENABLED=true" to turn it on
# "cors.allowed.origins" indicates which request origins are allowed
che.cors.allowed_origins=*
# "cors.support.credentials" indicates if it allows processing of requests with credentials
# (in cookies, headers, TLS client certificates)
che.cors.allow_credentials=false
# This property is used to provide value for WS Agent CORS allowed origins env variable from WS Master.
# If set to null, then the value will be automatically provided by WS Agent.
che.wsagent.cors.allowed_origins=NULL
# This property is used to provide value for WS Agent CORS credentials origins env variable from WS Master,
che.wsagent.cors.allow_credentials=true
# This property is used to provide value for WS Agent CORS enabling.
che.wsagent.cors.enabled=true

## Factory defaults.
# Editor and plugin which will be used for factories which are created from remote git repository
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.