We are attempting to submit a JCL job to our local enterprise solution server via the ESMAC JES control API and are receiving a response with code 400 and message stating “No Origin of Referer header present.” How do we configure the server to allow access control from all origins?
CORS Error
Best answer by Bruce Cheatwood
I resolved the issue. Initially, I suspected it was a CORS problem, but it turns out the origin must be specified in the request header. The headers for Origin, X-Requested-With, and Accept are now included in the API request, ensuring proper recognition and feedback. While the API gateway now accepts the request, I am encountering a 500 status code error due to a failure to bind to MLDAP.
Uri uri = new Uri(url);
HttpClient httpClient = new HttpClient();
client.DefaultRequestHeaders.Host = uri.Host;
client.DefaultRequestHeaders.Add(“Origin”, $”{uri.Scheme}://{uri.Host}”);
client.DefaultRequestHeaders.Add(“X-Requested-With”, ”XMLHttpRequest”);
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(@”application/json”));
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.



