Unverified Commit 4d639359 authored by 陈帅's avatar 陈帅 Committed by GitHub

use netlify functions (#3961)

* use netlify functions

* fix: change url
parent 7e2500c7
......@@ -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]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment