Comments (1)
我们开发时对于接口跨域问题是前端本地开发 server 加了层代理解决的,工作流等独立服务暂时还没有走代理。
后面我们会给工作流服务也加层前端代理,配置方式和 API_SERVER一样,通过启动时在命令内加入 WORKFLOW_API_SERVER=... 来指定需要代理的地址。
您可以先按如下调整,来临时使用前端服务代理工作流接口
// 目录:src/pages/workflow/api/base.js
export const controllerName = 'Workflow';
export default {
server: () => '/workflow_api',
// server: () => md.global.Config.WorkFlowUrl,
ajaxOptions: {
url: '',
type: 'Get',
cache: false,
dataType: 'json',
contentType: 'application/json',
},
};
// 目录:CI/serve.js
else if (req.url && req.url.startsWith('/workflow_api/')) {
req.url = req.url.replace('/workflow_api/', '');
proxy('http://address.of.worflow')(req, res, next);
}
from pd-openweb.
Related Issues (2)
- 同一行表单项,左侧拖拽到右侧有问题 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pd-openweb.