File tree Expand file tree Collapse file tree 1 file changed +6
-22
lines changed
Expand file tree Collapse file tree 1 file changed +6
-22
lines changed Original file line number Diff line number Diff line change @@ -858,32 +858,16 @@ function loadThingURLAdapter(addonManager) {
858858 for ( const url of config . urls ) {
859859 if ( 'authentication' in url ) {
860860 // remove http(s) from url
861- let urlStub = '' ;
862- if ( url . href . includes ( 'http://' ) ) {
861+ let urlStub = url . href ;
862+ if ( url . href . startsWith ( 'http://' ) ) {
863863 urlStub = url . href . substr ( 7 ) ;
864- }
865- if ( url . href . includes ( 'https://' ) ) {
864+ } else if ( url . href . startsWith ( 'https://' ) ) {
866865 urlStub = url . href . substr ( 8 ) ;
867866 }
868- switch ( url . authentication . method ) {
869- case 'jwt' :
870- adapter . authData [ urlStub ] = url . authentication ;
871- break ;
872- case 'basic' :
873- // adapter.authData[url_stub] = url.authentication;
874- // break;
875- // eslint-disable-next-line no-fallthrough
876- case 'digest' :
877- // adapter.authData[url_stub] = url.authentication;
878- // break;
879- // eslint-disable-next-line no-fallthrough
880- case 'none' :
881- break ;
882- default :
883- console . log ( `${ url . authentication . method } is not implemented` ) ;
884- break ;
885- }
867+
868+ adapter . authData [ urlStub ] = url . authentication ;
886869 }
870+
887871 adapter . loadThing ( url . href ) ;
888872 }
889873 startDNSDiscovery ( adapter ) ;
You can’t perform that action at this time.
0 commit comments