Skip to content

Commit 8eca986

Browse files
authored
Add ingress domain, so that I can then fix CORS issue with react frontend accessing API being hardcoded to localhost (#15)
* Add ingress domain, so that I can then fix CORS issue with react frontend accessing API being hardcoded to localhost * Use ingressdomain
1 parent 45a054e commit 8eca986

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

client/src/api/ownerReducers.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Owner } from 'src/types/owner';
44

55
export const ownersApi = createApi({
66
baseQuery: fetchBaseQuery({
7-
baseUrl: 'http://localhost:8081/rest',
7+
baseUrl: 'http://petclinic-demogorgon.staging-service.nr-ops.net:8081/rest',
88
prepareHeaders: (headers) => {
99
headers.set('Content-Type', 'application/json');
1010
return headers;

grandcentral/ingressdomains.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
version: gc/alpha1
3+
kind: IngressDomain
4+
spec:
5+
domain: petclinic-demogorgon.staging-service.nr-ops.net
6+
visibility: internal
7+
target_environment: staging
8+
routes:
9+
- priority: 100
10+
config:
11+
matchOn:
12+
path:
13+
prefix: "/"
14+
options:
15+
timeout: 10s
16+
cors:
17+
enabled: true
18+
csrf:
19+
enabled: true
20+
auth:
21+
type: unauthenticated

0 commit comments

Comments
 (0)