Dev Server Proxy to HTTPS backend does not seem to work
See original GitHub issueDo NOT ignore this template or your issue will have a very high chance to be closed without comment.
Describe the bug
Trying to proxy backend requests to a local server that is using HTTPS. Proxy configuration as follows:
module.exports = {
proxy: {
'/api': {
target: 'https://localhost:8000/api',
changeOrigin: true,
}
}
}
(Note that I have also tried various other variations without any improvements)
Requests fail to go through, appear to be attempting to proxy without HTTPS, i.e. to http://localhost:8000/api. End result is that the request fails with a 500 code, would expect it to query the server.
Reproduction
I think this is quite straightforward, but let me know if not.
System Info
- required
vite
version: v1.0.0-beta.12 - required Operating System: Windows 10
- required Node version: 12.18.2
- Optional:
- npm/yarn version: 1.22.4
- Installed
vue
version (fromyarn.lock
orpackage-lock.json
): 3.0.0-beta.24 - Installed
@vue/compiler-sfc
version: 3.0.0-beta.24
Logs (Optional if provided reproduction)
No error log, request simply fails in the browser.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:7 (2 by maintainers)
Top Results From Across the Web
webpack dev-server proxy over https - Stack Overflow
I'm using Vue and the webpack cli template. My back end is hosted in a docker container and can be seen at localhost:8443/foo....
Read more >Webpack Dev Server ^3.9.0 unable to POST (send data to ...
A simple solution to fix this is to add append another configuration property to your dev server key named setup(). This will take...
Read more >devServer proxy(in vue.config.js) not working - Get Help
I encountered this problem, too. devServer proxy not working What should i do? vue.config.js exists in root dir of vue project.
Read more >HTTPS In Development: A Practical Guide - Marmelab
For the development environment, it seems trickier, but it isn't that ... On a development environment, we can use a reverse proxy, too!...
Read more >Mastering Angular proxy configuration | by JM Robles - Medium
WTF can't access to my backend! Angular CLI provides a solution to bypass these problems: reverse proxy server. Enable the Angular Proxy. To...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
add
secure: false
, such asI’ve done some more testing on my end and it looks like the problem is with my backend service. When I swap in a different https backend, everything with the vite proxy works as expected. I’m using
secure: false
.Thanks for your help.