From f8d4b3bd25a970de81bde5678126dd4884657015 Mon Sep 17 00:00:00 2001 From: "Calvin A. Allen" Date: Mon, 28 Oct 2024 11:09:22 -0400 Subject: [PATCH 1/2] Add ingress domain, so that I can then fix CORS issue with react frontend accessing API being hardcoded to localhost --- grandcentral/ingressdomains.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 grandcentral/ingressdomains.yml diff --git a/grandcentral/ingressdomains.yml b/grandcentral/ingressdomains.yml new file mode 100644 index 0000000..0a09aaf --- /dev/null +++ b/grandcentral/ingressdomains.yml @@ -0,0 +1,21 @@ +--- +version: gc/alpha1 +kind: IngressDomain +spec: + domain: petclinic-demogorgon.staging-service.nr-ops.net + visibility: internal + target_environment: staging + routes: + - priority: 100 + config: + matchOn: + path: + prefix: "/" + options: + timeout: 10s + cors: + enabled: true + csrf: + enabled: true + auth: + type: unauthenticated From d12712e08498e7c49a7a958d1395a7f14341955d Mon Sep 17 00:00:00 2001 From: "Calvin A. Allen" Date: Mon, 28 Oct 2024 11:11:23 -0400 Subject: [PATCH 2/2] Use ingressdomain --- client/src/api/ownerReducers.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/api/ownerReducers.tsx b/client/src/api/ownerReducers.tsx index d982552..c4d3596 100644 --- a/client/src/api/ownerReducers.tsx +++ b/client/src/api/ownerReducers.tsx @@ -4,7 +4,7 @@ import { Owner } from 'src/types/owner'; export const ownersApi = createApi({ baseQuery: fetchBaseQuery({ - baseUrl: 'http://localhost:8081/rest', + baseUrl: 'http://petclinic-demogorgon.staging-service.nr-ops.net:8081/rest', prepareHeaders: (headers) => { headers.set('Content-Type', 'application/json'); return headers;