Closed EarsKilla closed 5 months ago
I'm afraid that right now there is no simple solution for that. More info: https://github.com/microsoft/vscode/issues/72900
if fetch
don't working inside webview...
what about local http server that proxify all requests and adding cors headers to response. I think it's not a good way but it can bypass this limitation.
or this solution won't work inside vs-code?
I will think about proper solution for this problem. Local http server could solve this, but I'm not sure, if it won't add too much overhead to this simple extension.
It is possible to add authentication for custom sources ? For exemple, on Github, you have to put your credentials to access Nuget packages.
It is possible to add authentication for custom sources ? For exemple, on Github, you have to put your credentials to access Nuget packages.
Nuget Credentials provider is used to authenticate request. To use it, you need to provide path to the folder with the Credentials provider in extension settings. Not sure if it's compatible with Github.
I have exactly this problem in my attempt to implement https://github.com/pcislo/vscode-nuget-gallery/issues/24. This is driving me nuts. If one comes up with an idea, please write it here 🙂
To make it work, instead of sending request in webview, you can try passing the request object with url to the extension via command (the same way as for example list of projects is send right now) and then send back the request respone to the webview.
I’m trying this currently. But this will mean a bit more work as functionality is shifted into the extension. I’ll prepare something and put up a PR as soon as I have it working.
I have a PR ready that fixes this and #24 but have a problem with vue that I cannot figure out on my own. If you'd like to help out, take a look at #26
Guys I have a similar query. My custom source has user/password as well. how is that going to work out with the current solution?
I haven’t had time to investigate the one remaining issue with my PR. I’ll try to take a look at it ASAP.
I got the same Error message if using this myget source:
{"name": "AvaloniaCI","url": "https://www.myget.org/F/avalonia-ci/api/v3/index.json"}
Any updates on this issue?
Here is config item that i was added:
I'm getting
Error
when trying to look for packages in this source.Here is log from console.
As i can see, this server really don't response with any CORS header.
But maybe solutions from this issue can help you to fix this: https://github.com/electron/electron/issues/1990
If you need more information about my issue: