node-solid-server icon indicating copy to clipboard operation
node-solid-server copied to clipboard

NSS does not redirect from /foo to /foo/ for private resources (from command line)

Open jeff-zucker opened this issue 3 years ago • 0 comments

I have myPod/private/ and myPod/public/ folders.

The code below, after login, gives 200 if the target is myPod/private/ but a 401 if the target is myPod/private. However both myPod/public and myPod/public/ return a folder list.

import {SolidNodeClient} from './';                                             
const client = new SolidNodeClient();                                           
                                                                                
const target = "https://jeff-zucker.solidcommunity.net/private";                
                                                                                
async function test(credentials){                                               
  let session = await client.login( credentials );                              
  if( session.isLoggedIn ){                                                     
    let r = await client.fetch( target );                                       
    console.log(  r.status  );
  }                                                                             
  else {                                                                        
    console.log(  'Could not log in!'  );                                       
  }                                                                             
}                                                                               
                                                                                
test({                                                                          
  username:'jeff-zucker',                                                       
  idp:'https://solidcommunity.net',                                             
  password:'REDACTED'                                                        
})    

jeff-zucker avatar Apr 12 '21 21:04 jeff-zucker