This repository was archived by the owner on Apr 7, 2025. It is now read-only.
Repository navigation
Replies: 1 comment 1 reply
|
Hi Alex, Are you part of Ambassador slack group. Very friendly folks and
you get get responses much faster, as these are related to configuration
and not starter kit. Also slack search may reveal the answer in that group.
Let us know what you find out.
…On Tue, Jan 25, 2022 at 12:41 PM Alex Agulyansky ***@***.***> wrote:
After building the environment on Kubernetes we tried migrating our
backend to it.
As a result, *sometimes*, CORS check is failing.
[image: image]
<https://user-images.githubusercontent.com/916432/151052149-29179424-fc46-4f36-8152-e54075db3aa1.png>
As per Ambassador docs
<https://www.getambassador.io/docs/edge-stack/latest/topics/using/cors/>
we added CORS config to the mapping:
apiVersion: getambassador.io/v2
kind: Mapping
metadata:
name: priz-api
namespace: ambassador
spec:
prefix: /
host: api.priz.guru
service: priz-api.backend
cors:
origins: https://app.priz.guru
methods: GET, POST, PUT, PATCH, OPTIONS, DELETE
headers: "*"
exposed_headers: "*"
max_age: "86400"
Nothing changed. The most interesting part is that if I initiate the same
request again (create a resource), it works!?!?!?
What am I doing wrong?
Also, the backend API is supporting CORS and it works for years through a
regular LB.
What is the best approach here?
—
Reply to this email directly, view it on GitHub
<#119>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL6OLKLZW7I2IORUBJXFN5TUX4DHLANCNFSM5MZJK2IA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: <digitalocean/Kubernetes-Starter-Kit-Developers/repo-discussions/119@
github.com>
|
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
After building the environment on Kubernetes we tried migrating our backend to it.
As a result, sometimes, CORS check is failing.
As per Ambassador docs we added CORS config to the mapping:
Nothing changed. The most interesting part is that if I initiate the same request again (create a resource), it works!?!?!?
What am I doing wrong?
Also, the backend API is supporting CORS and it works for years through a regular LB.
What is the best approach here?
All reactions