Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iview-cli 在webpack.dev.config.js 里的devServer配置代理跨域不生效 #37

Open
anotherLee opened this issue Jan 31, 2018 · 0 comments

Comments

@anotherLee
Copy link

devServer:{
        historyApiFallback: true,
        hot: true,
        inline: true,
        proxy:{
            '/api': {
                target: 'http://example.com:8080',
                secure: false,
                changeOrigin: true,
                pathRewrite:{
                    '^/api':'/api'
                }
            }
        }
    }

如此配置之后依然无法转发和跨域,参考了goole到的几篇文章,似乎都是这样配的。
参考地址1:https://segmentfault.com/q/1010000011222653
参考地址2:https://hk.saowen.com/a/1bfaaf0ee2020d8736982c9214aeffb83e1fac39b84eacac46388775de49cb38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant