google-cloud-run

Ajax request to cloud run service that requires authentication

只谈情不闲聊 提交于 2019-12-04 01:38:55
问题 I'm having a CORS related issue with google cloud run on a service that requires authentication. If I try to execute a curl command through the cli, with a Bearer token, everything works fine. Unfortunately if I try to execute the same call through ajax in javascript, I receive a 403. const http = new XMLHttpRequest(); const url = 'https://my-app.run.app'; http.open("GET", url); http.withCredentials = true; http.setRequestHeader("authorization", 'Bearer ' + id_token); http.send(); http

How to securely connect to Cloud SQL from Cloud Run?

℡╲_俬逩灬. 提交于 2019-11-29 04:07:42
How do I connect to the database on Cloud SQL without having to add my credentials file inside the container? Steren UPDATE: to connect to Cloud SQL from Cloud Run see the official documentation Cloud SQL is now supported by the fully managed version of Cloud Run (Cloud Run on GKE users were already able to use Cloud SQL using a private IP) The feature is currently in alpha, so you need to use gcloud alpha (it will be in gcloud beta within 10 days): To get started: if you do not have one already, create a Cloud SQL instance . make sure that the Cloud SQL admin API deploy a new revision of your

How to securely connect to Cloud SQL from Cloud Run?

爷,独闯天下 提交于 2019-11-27 18:06:21
问题 How do I connect to the database on Cloud SQL without having to add my credentials file inside the container? 回答1: UPDATE: to connect to Cloud SQL from Cloud Run see the official documentation Cloud SQL is now supported by the fully managed version of Cloud Run (Cloud Run on GKE users were already able to use Cloud SQL using a private IP) The feature is currently in alpha, so you need to use gcloud alpha (it will be in gcloud beta within 10 days): To get started: if you do not have one