Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ingress domain, so that I can then fix CORS issue with react frontend accessing API being hardcoded to localhost #15

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/src/api/ownerReducers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
21 changes: 21 additions & 0 deletions grandcentral/ingressdomains.yml
Original file line number Diff line number Diff line change
@@ -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
Loading