ritwickdey / vscode-live-server

Launch a development local Server with live reload feature for static & dynamic pages.
https://ritwickdey.github.io/vscode-live-server
MIT License
5.76k stars 1.26k forks source link

liveServer.settings.proxy does't work for me #605

Open R10burning opened 4 years ago

R10burning commented 4 years ago

env: win10 version 5.6.1 setting.json: liveServer.settings.proxy": { "enable": true, "baseUri": "/api", "proxyUri": "http://baobab.kaiyanapp.com" }, request: axios.get('/api/v4/tabs/selected').then(function(res) { console.log(res) }) result: 404 Request URL: http://127.0.0.1:5500/api/v4/tabs/selected Request Method: GET Status Code: 404 Not Found

valleylmh commented 4 years ago

me too, proxy doesn't work

bujidao commented 3 years ago

I've tried and is works for me!

vscode config: image

you request: image

[node]: Keep in mind that after you changed you proxy configs, you need to restart you vscode, if not, your proxy won't works.

WeeHorse commented 2 years ago

Nope, not working with post requests, only get requests work for me.

chenweigh commented 1 year ago

same problem.

"liveServer.settings.host": "localhost",
    "liveServer.settings.proxy": {
        "enable": true,
        "baseUri": "/vip",
        "proxyUri": "http://domain/vip"
    },
    "liveServer.settings.CustomBrowser": "chrome",
    "liveServer.settings.port": 8084,
    "liveServer.settings.root": "/",
    "liveServer.settings.useWebExt": false

$.ajax("/vip/get/")

404

aszx0413 commented 1 year ago

Still not working

ivanrodriguezd commented 8 months ago

There is a solution for this issue? It's not working for me neither. Screenshot 2024-02-08 113131

FI-GGG commented 2 months ago

I've tried and is works for me!我已经尝试过并且对我有用!

vscode config: VSCode配置: image

you request: 您的请求: image

[node]: Keep in mind that after you changed you proxy configs, you need to restart you vscode, if not, your proxy won't works.[node]: 请记住,更改代理配置后,您需要重新启动 vscode,否则,您的代理将无法工作。

必须重启vscode 才能用,You must restart vs code to use it