IBM Support

z/OS Connect CORS headers can't be disabled

Question & Answer


Question

We currently have version: z/OS Connect Enterprise Edition version 2.0.10.1 (20171016-1033)

We want to disable CORS headers and tried to set:

  <cors allowCredentials="false" allowedHeaders="sadasd"  
 allowedMethods="asdsad" allowedOrigins="http://sdsdfsdfds.adsf" domain=" 
 /                                                                        
 " id="defaultCORSConfig" maxAge="3600"/>  

We also tried to comment it out:

     <é-- <cors allowCredentials="true" allowedHeaders="Origin, Content-   
 Type, Authorization" allowedMethods="GET, POST, PUT, DELETE, OPTIONS"    
 allowedOrigins="*" domain="/" id="defaultCORSConfig" maxAge="3600"       
 /> -->                                                                   

But all that doesn't help. How can we disable CORS headers?

I couldn't find exact syntax but found contradictory information:

  1. The only valid value for this header is true (case-sensitive). If you
    don't need credentials, omit this header entirely (rather than setting
    its value to false).

  2. This header must be included in all valid CORS responses; omitting the
    header will cause the CORS request to fail.

Have you any idea ? Thanks so much Angela

Answer

Hi Angela,

z/OS Connect EE will always send CORS headers if the client has sent an Origin header. At version 2.0.3 when support to use the Liberty standard element was added, it only allows users to further customise CORS. If the Liberty CORS support is not used, then z/OS Connect EE falls back to the original CORS support, which is always enabled.

  1. Why do you need to disable CORS support?

  2. Which CORS header are your two statements (1 & 2 in your question) referring to?

Thanks, Alex

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSGMGV","label":"CICS Transaction Server"},"Platform":[{"code":"PF035","label":"z\/OS"}],"Component":"","Version":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}},{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSNPJM","label":"IBM z\/OS Connect"},"Platform":[{"code":"PF035","label":"z\/OS"}],"Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Product Synonym

CICS/TS CICSTS CICS TS CICS Transaction Server;zCEE

Document Information

Modified date:
14 February 2023

UID

dwa1424958