* use netlify functions * fix: change url
@@ -14,7 +14,7 @@ function parseKey(key) {
method = spliced[0].toLowerCase();
path = spliced[1]; // eslint-disable-line
}
- const routerBasePath = process.env.NODE_ENV === 'dev' ? `${path}` : `/.netlify/functions${path}`;
+ const routerBasePath = `${path}`;
return {
method,
path: routerBasePath,
@@ -3,7 +3,7 @@
[[redirects]]
from = "/api/*"
- to = "https://us-central1-antd-pro.cloudfunctions.net/api/api/:splat"
+ to = "/.netlify/functions/api/:splat"
status = 200
force = true
[redirects.headers]