As described in Adding CORS support to
ESP,
you can configure the Extensible Service Proxy
(ESP) to support CORS.
If the ESP options don't provide the CORS support that your
application requires, you can add the CORS options to ESP's configuration file,
nginx.conf.
Adding the CORS options to nginx.conf
To add the CORS options:
Start with a nginx.conf file that contains the configuration required by
Cloud Endpoints. You can start with the sample
nginx.conf,
or if you have already deployed ESP, you can SSH to the ESP container and
copy the nginx.conf file from the /etc/nginx/endpoints/ directory.
Add the CORS options that your application requires to nginx.conf. You can
use the CORS on NGINX example
as a starting point.
Start ESP with the --nginx_config option with the path to the custom
nginx.conf file.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-21 UTC."],[[["You can configure the Extensible Service Proxy (ESP) to support CORS, as described in the documentation for adding CORS support to ESP."],["If ESP options don't meet your application's CORS needs, you can customize CORS by adding options directly to ESP's `nginx.conf` configuration file."],["To add custom CORS options, begin with a `nginx.conf` file required by Cloud Endpoints, such as the sample one, or by retrieving it from a deployed ESP container."],["After adding your custom CORS settings to `nginx.conf`, start ESP using the `--nginx_config` option, pointing to your modified configuration file."]]],[]]