Skip to content

Commit

Permalink
fix: cors for test environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Kpoke committed Jul 31, 2023
1 parent 43b5e3e commit d3e093b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions deployment/overlays/test/mapping.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: getambassador.io/v2
kind: Mapping
metadata:
name: treetracker-wallet-api-v2
spec:
cors:
origins: '*'
methods: GET, POST, PATCH, OPTIONS
headers:
- content-type
- authorization
- treetracker-api-key
1 change: 1 addition & 0 deletions server/handlers/walletHandler/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const walletGet = async (req, res) => {

res.status(200).json({
total: count,
query: { ...req.query, limit, offset },
wallets,
});
};
Expand Down

0 comments on commit d3e093b

Please sign in to comment.