Product: PowerShell Universal
Version: 3.7.14
Does anyone use the PowerShell Universal VSCode extension over a HTTPS gateway?
I’m wondering if this is supported.
I have loaded up the extension, and it works without error on my localhost container, however:
When I attempt to connect to an FQDN or IP address, I get the following:
If I add :443 on to the end, I get the following:
Is there or, will there be, any support for using this over HTTPS?
It would be a quite a ‘nice to have’ feature, so I can automate dev environments in the cloud without data going over HTTP.
adam
March 7, 2023, 8:57pm
2
The VS Code extension uses the HTTPS NodeJS module so it should work. I see that you can get this error if you prefix the URL with the scheme (HTTP\HTTPS)
node.js
I wouldn’t be surprised if we were missing some sort of config for the HTTPS connection here.
import * as vscode from 'vscode';
import { Dashboard, DashboardDiagnostics, Settings, Endpoint, Script, Job, ScriptParameter, DashboardLog, DashboardComponent, DashboardFramework, JobPagedViewModel, JobLog, FileSystemItem } from './types';
import axios, { AxiosPromise } from 'axios';
import { load, SetAppToken, SetUrl } from './settings';
import { Container } from './container';
const https = require('https');
export class Universal {
private context: vscode.ExtensionContext;
constructor(context: vscode.ExtensionContext) {
this.context = context;
}
hasConnection(): boolean {
const settings = load();
if (settings.appToken === '' && settings.connections.length === 0) {
Thanks @adam ,
I will need to go and take a deeper look at this.
This is an instance in Azure protected by an app gateway. I suspect terminating SSL there is presenting some challenges.
HTTP and HTTPS prefixes were removed from the URL however, the Connect-PSUServer command returned the following when specifying port 443:
Connect-PSUServer: Call failed with status code 400 (Bad Request): GET http://12.34.56.78:443/api/v1/accessible
I’ll have a rethink of how I can do this.
Many thanks for the info