小编Ale*_*der的帖子

Istio 入口网关:404 NRroute_not_found

我想配置一个 Istio 入口网关,它根据 HTTP 路径的前缀将流量路由到不同的服务。

例如,HTTP 流量路径/myservice应路由到服务myservice

到目前为止,我已经创建了以下 YAML 配置:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: myservice
  namespace: microservices
  labels:
    app: myservice
spec:
  replicas: 1
  selector:
    matchLabels:
      app: myservice
  template:
    metadata:
      labels:
        app: myservice
    spec:
      containers:
        - name: myservice
          image: myservice-node
          ports:
            - containerPort: 3002
          imagePullPolicy: Never
---
apiVersion: v1
kind: Service
metadata:
  name: myservice
  namespace: microservices
spec:
  ports:
    - nodePort: 32015
      port: 3002
      targetPort: 3002
  selector:
    app: myservice
  type: LoadBalancer
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway …
Run Code Online (Sandbox Code Playgroud)

http-status-code-404 istio kubernetes-ingress

4
推荐指数
1
解决办法
2万
查看次数

使用不记名令牌访问受 Google Cloud IAP 保护的资源会出现错误代码 13

我正在尝试从我的 iOS 应用访问受 Google Cloud IAP 保护的资源。

我可以从应用程序登录到我的 Google 帐户并接收 ID 令牌,但是在我想要请求的资源的 Authorization 标头中将 ID 令牌设置为不记名令牌时,我收到以下响应,其中包含 HTTP 错误代码 401。

“您的请求有问题。错误代码 13”

我试图用 Postman 发送请求,但这也导致了同样的错误。

我使用以下代码从下载的credentials.plist 文件中设置客户端ID。

if let path = Bundle.main.path(forResource: "credentials", ofType: "plist") {
   let nsDictionary = NSDictionary(contentsOfFile: path)
   let clientId = nsDictionary!["CLIENT_ID"] as? String

   GIDSignIn.sharedInstance().clientID = clientId
   GIDSignIn.sharedInstance().delegate = self
   GIDSignIn.sharedInstance().uiDelegate = self;
}
Run Code Online (Sandbox Code Playgroud)

之后我登录谷歌。

if GIDSignIn.sharedInstance().hasAuthInKeychain() {
   GIDSignIn.sharedInstance().signInSilently()
} else {
   GIDSignIn.sharedInstance().signIn()
}
Run Code Online (Sandbox Code Playgroud)

登录后,我将 idToken 发送到受 Google Cloud IAP 保护的资源。

func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, …
Run Code Online (Sandbox Code Playgroud)

google-app-engine google-iap

2
推荐指数
1
解决办法
5677
查看次数