vscode-restclient icon indicating copy to clipboard operation
vscode-restclient copied to clipboard

Is rest-client.certificates path compatible with wildcards?

Open stephprat opened this issue 4 years ago • 5 comments

Hi, I need to make the request on several hosts of the same domain using the same certificates. Is the following notation already covered (with wildcards):

"rest-client.certificates": {
    "*.example.com": {
        "cert": "/Users/demo/Certificates/client.crt",
        "key": "/Users/demo/Keys/client.key"
    }
}

Thanks! Stephan

stephprat avatar May 28 '20 08:05 stephprat

@stephprat it's not supported currently, a nice suggestion, I will consider it carefully. BTW, if you have interests, it's really appreciated.

Huachao avatar May 28 '20 08:05 Huachao

Thanks for the fast answer! What do you mean by interest?

stephprat avatar May 28 '20 08:05 stephprat

@stephprat I mean if you want to contribute to the extension?

Huachao avatar May 28 '20 08:05 Huachao

I also would love this! 👍

RafaeLeal avatar Jun 15 '22 14:06 RafaeLeal

Hi @Huachao Instead of having only the domain name in key, it would be nice if we support request url or some key in it, in that way if user want specific cert to be used for a specific request, then we can elevate per-request setting and specify them as below

"rest-client.certificates": {
    "*.example.com/path1": {
        "cert": "/Users/demo/Certificates/client.crt",
        "key": "/Users/demo/Keys/client.key"
    },
   "certx": {
        "cert": "/Users/demo/Certificates/clientx.crt",
        "key": "/Users/demo/Keys/clientx.key"
    },
}
GET https://sb.example.com/path1

###
# @cert certx
GET https://sb.example.com/path1

nt126716 avatar Jan 11 '24 15:01 nt126716