Merge branch 'HeyPuter:main' into main

This commit is contained in:
meetqy 2024-03-30 10:54:14 +08:00 committed by GitHub
commit 4aaa44a487
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1932,7 +1932,6 @@ window.launch_app = async (options)=>{
iframe_url.searchParams.append('puter.item.name', options.filename);
iframe_url.searchParams.append('puter.item.path', options.file_path ? `~/` + options.file_path.split('/').slice(1).join('/') : undefined);
iframe_url.searchParams.append('puter.item.read_url', options.readURL);
// iframe_url.searchParams.append('puter.item.write_url', file_signature.write_url);
iframe_url.searchParams.append('puter.domain', window.app_domain);
}
@ -1948,6 +1947,9 @@ window.launch_app = async (options)=>{
iframe_url.searchParams.append('puter.auth.token', options.token);
}
if(api_origin)
iframe_url.searchParams.append('puter.api_origin', api_origin);
// Try to acquire app token from the server
else{
let response = await fetch(window.api_origin + "/auth/get-user-app-token", {