Skip to content

Commit

Permalink
integrate zones list endpoint MAASENG-1975
Browse files Browse the repository at this point in the history
  • Loading branch information
petermakowski committed Jul 20, 2023
1 parent baa0060 commit 6566331
Show file tree
Hide file tree
Showing 6 changed files with 392 additions and 331 deletions.
8 changes: 7 additions & 1 deletion scripts/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@ app.get(`${BASENAME}/`, (req, res) =>
res.redirect(`${BASENAME}${REACT_BASENAME}`)
);

const API_ENDPOINTS = [
`${BASENAME}/api`,
`${BASENAME}/accounts`,
`${BASENAME}/a`,
];

// Proxy API endpoints to the MAAS.
app.use(
createProxyMiddleware([`${BASENAME}/api`, `${BASENAME}/accounts`], {
createProxyMiddleware(API_ENDPOINTS, {
changeOrigin: true,
onProxyReq(proxyReq) {
// Django's CSRF protection requires requests to come from the correct
Expand Down
Loading

0 comments on commit 6566331

Please sign in to comment.