Hi,
I am facing CORS issue and after a lot of try not able to understand how to resolve it.
we have tried multiple options but failed every time, please help on this.
Tried option-1 : -
Deployed espV2 container with CORS -
gcloud run deploy CLOUD_RUN_SERVICE_NAME \
--image="gcr.io/ESP_PROJECT_ID/endpoints-runtime-serverless:ESP_VERSION-CLOUD_RUN_HOSTNAME-CONFIG_ID" \
--set-env-vars=ESPv2_ARGS=--cors_preset=basic \
--allow-unauthenticated \
--platform managed \
--project ESP_PROJECT_ID
Tried option-2 :-
Edit the gcloud_build_image like below-
ENV ESPv2_ARGS ^++^--cors_preset=basic++--cors_allow_method="GET,PUT,POST"++--cors_allow_credentials
and deployed container with below -
gcloud run deploy
CLOUD_RUN_SERVICE_NAME \ --image="
gcr.io/ESP_PROJECT_ID/endpoints-runtime-serverless:
ESP_VERSION-
CLOUD_RUN_HOSTNAME-
CONFIG_ID" \ --set-env-vars=
ESPv2_ARGS=
^++^--cors_preset=basic++--cors_allow_methods=GET, POST, PUT, PATCH, DELETE, OPTIONS \ --allow-unauthenticated \ --platform managed \ --project
ESP_PROJECT_ID
can someone please help into this, how to resolve.
Regards,