osr proxy
This commit is contained in:
@@ -124,7 +124,7 @@ export default defineConfig((/* ctx */) => {
|
||||
'/api': {
|
||||
target: 'http://localhost:49151',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||
// rewrite: (path) => path.replace(/^\/api/, ''),
|
||||
},
|
||||
'/socket.io': {
|
||||
target: 'http://localhost:49151', // Your backend WebSocket server
|
||||
@@ -134,24 +134,15 @@ export default defineConfig((/* ctx */) => {
|
||||
changeOrigin: true,
|
||||
// rewrite: (path) => path.replace(/^\/socket.io/, ''),
|
||||
},
|
||||
'/osm': {
|
||||
target: 'https://nominatim.openstreetmap.org',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/osm/, ''),
|
||||
headers: {
|
||||
Referer: 'https://nominatim.openstreetmap.org/',
|
||||
'User-Agent': 'map-sim-location/0.0.1 (iam@williambr.uno)',
|
||||
},
|
||||
},
|
||||
'/ors': {
|
||||
// target: 'https://router.project-osrm.org',
|
||||
// target: 'https://router.project-osrm.org',
|
||||
target: 'http://localhost:8080',
|
||||
changeOrigin: true,
|
||||
// rewrite: (path) => path.replace(/^\/osrm/, ''),
|
||||
// headers: {
|
||||
// Referer: 'https://router.project-osrm.org/',
|
||||
// 'User-Agent': 'map-sim-location/0.0.1 (iam@williambr.uno)',
|
||||
// },
|
||||
// rewrite: (path) => path.replace(/^\/osrm/, ''),
|
||||
// headers: {
|
||||
// Referer: 'https://router.project-osrm.org/',
|
||||
// 'User-Agent': 'map-sim-location/0.0.1 (iam@williambr.uno)',
|
||||
// },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user