File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -377,7 +377,7 @@ export class RedHatAuthenticationService {
377377 if ( 'err' in redirectReq ) {
378378 const { err, res } = redirectReq ;
379379 res . writeHead ( 302 , {
380- Location : `/?service=${ this . config . serviceId } &error=${ encodeURIComponent ( ( err as Error ) ?. message || 'Unknown error' ) } ` ,
380+ Location : `/?service=${ this . config . serviceId } &error=${ encodeURIComponent ( ( err as Error ) ?. message || 'Unknown error' ) } &protocol= ${ env . urlProtocol } ` ,
381381 } ) ;
382382 res . end ( ) ;
383383 throw err ;
@@ -437,7 +437,7 @@ export class RedHatAuthenticationService {
437437 const token = this . convertToken ( tokenSet ! , scope ) ;
438438
439439 callbackResult . res . writeHead ( 302 , {
440- Location : `/?service=${ this . config . serviceId } &login=${ encodeURIComponent ( token . account . label ) } ` ,
440+ Location : `/?service=${ this . config . serviceId } &login=${ encodeURIComponent ( token . account . label ) } &protocol= ${ env . urlProtocol } ` ,
441441 } ) ;
442442 callbackResult . res . end ( ) ;
443443
@@ -453,7 +453,7 @@ export class RedHatAuthenticationService {
453453
454454 public error ( response : ServerResponse , error : unknown ) : void {
455455 response . writeHead ( 302 , {
456- Location : `/?error=${ encodeURIComponent ( ( error as Error ) ?. message || 'Unknown error' ) } ` ,
456+ Location : `/?error=${ encodeURIComponent ( ( error as Error ) ?. message || 'Unknown error' ) } &protocol= ${ env . urlProtocol } ` ,
457457 } ) ;
458458 response . end ( ) ;
459459 }
Original file line number Diff line number Diff line change 1212 />
1313 < script lang ="javascript ">
1414 function onLoad ( ) {
15- window . location . href = 'podman-desktop://'
15+ var protocol = ( / [ ? & ] p r o t o c o l = ( [ ^ & ] + ) / . exec ( window . location . search ) || [ ] ) [ 1 ] ;
16+ window . location . href = ( protocol || 'podman-desktop' ) + '://' ;
1617 } ;
1718 window . onload = onLoad ;
1819 </ script >
You can’t perform that action at this time.
0 commit comments