Skip to main content

I'm running SDC in a Docker container and I am trying to invoke a HTTP call with HTTP Client using a restricted header like below:

curl -X GET -H "Host: my-host" http://my-service/my-endpoint

 

However, by default the header is ignored with the following warning:

HttpUrlConnector - Attempt to send restricted header(s) while the esun.net.http.allowRestrictedHeaders] system property not set. Header(s) will possibly be ignored

Where do I set this property? Adding it to SDC config did not help.

You need to set the SDC_JAVA_OPTS environment variable which gets passed to the JVM. You can do so from docker run like this:

docker run --env SDC_JAVA_OPTS="-Dsun.net.http.allowRestrictedHeaders=true" ...

 


Reply