Add other backend API proxy logic
This commit is contained in:
@@ -2,7 +2,7 @@ import TableEntry from "../models/TableEntry";
|
||||
|
||||
export default class UserStatsService {
|
||||
|
||||
private apiURL = '/stats'
|
||||
private apiURL = '/api/stats'
|
||||
|
||||
private requestInit: RequestInit = {
|
||||
headers: {
|
||||
|
||||
10
frontend/src/setupProxy.js
Normal file
10
frontend/src/setupProxy.js
Normal file
@@ -0,0 +1,10 @@
|
||||
const { createProxyMiddleware } = require('http-proxy-middleware');
|
||||
module.exports = function(app) {
|
||||
app.use(
|
||||
'/api',
|
||||
createProxyMiddleware({
|
||||
target: 'https://api.tsotr.humenius.me',
|
||||
changeOrigin: true,
|
||||
})
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user