Show TOC

ICF Service EnhancementLocate this document in the navigation structure

To support CORS, SAP Geographical Enablement Framework's ICF Services need to be enhanced to support cross-origin requests. The services may need to respond with the following header: Access-Control-Allow-Origin: *. A wildcard (*) allows all domains or origins.

Of course, this can be further tuned with more specific domain names.

By default, the delivered handler class (CL_GEF_ESRI_REST_HANDLER) does not allow cross-origin requests. However, its behavior can be changed using SAP Enhancement Technologies. For example, with ABAP Source Code Enhancements, an implicit enhancement can be inserted at the start of method SET_RESPONSE:

Sample Code
ENHANCEMENT 1 ZENHANCE_CORS. "active version
io_response->set_header_field( iv_name = 'Access-Control-Allow-Origin' iv_value = '*' ) ##NO_TEXT. ENDENHANCEMENT.

During the enhancement, if the service name or path changes, please update the Customizing for the GIS Provider with transaction GEF_GIS_CONFIG.

Note

Some of the Esri API libraries or tools may also check the CORS support from service: GEF/arcgis/rest/info.

The info service is not delivered, You may need to create the info ICF node under rest node and define it; but you can reuse the handler for ICF node service. For details on ICF configuration and definition, please refer to the Configuring REST Services section.