Hangar/frontend-new/proxy.config.ts

25 lines
684 B
TypeScript
Raw Normal View History

2022-03-26 03:40:37 +08:00
const proxyHost = process.env.proxyHost || "http://localhost:8080";
const authHost = process.env.authHost || "http://localhost:3001";
2022-06-12 02:00:54 +08:00
const oauthHost = process.env.oauthHost || "http://localhost:4444";
2022-03-26 03:40:37 +08:00
exports["default"] = {
// backend
"/api/": proxyHost,
"/signup": proxyHost,
"/login": proxyHost,
"/logout": proxyHost,
"/handle-logout": proxyHost,
"/refresh": proxyHost,
"/invalidate": proxyHost,
"/v2/api-docs/": proxyHost,
"/robots.txt": proxyHost,
"/sitemap.xml": proxyHost,
"/global-sitemap.xml": proxyHost,
"/*/sitemap.xml": proxyHost,
"/statusz": proxyHost,
// auth
"/avatar": authHost,
"/oauth/logout": authHost,
2022-06-12 02:00:54 +08:00
"/oauth2": oauthHost,
2022-03-26 03:40:37 +08:00
};