const {createProxyMiddleware: proxy} = require('http-proxy-middleware');

module.exports = function (app) {
    app.use(
        proxy('/terrain', {
            "target": "http://data.mars3d.cn/",
            changeOrigin: true
        })
    )
    app.use(  
        proxy('/openApi', {
            "target": "http://47.109.60.82:9989",
            changeOrigin: true
        })
    )
    app.use(
        proxy('/geoserver2', {
            "target": "http://geo.qklny.cn",
            changeOrigin: true,
            
            pathRewrite: { '^/geoserver2': '/geoserver' }
        })
    )
    app.use(
        proxy('/geoserver', {
            "target": "http://47.109.60.82:8080",
            changeOrigin: true
        })
    )
}