Fix ladl.link transfer QR redirect loop causing 500 errors.
Deploy Ladill Link / deploy (push) Successful in 1m1s

Proxy transfer paths directly to transfer.ladill.com and stop following ladl.link redirects server-side so recipient links resolve.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-06-29 20:55:48 +00:00
co-authored by Cursor
parent 62bab93b26
commit c5e92012ff
3 changed files with 117 additions and 29 deletions
+30
View File
@@ -65,4 +65,34 @@ class LinkRedirectTest extends TestCase
&& $request->hasHeader('X-Ladill-Internal', '1');
});
}
public function test_transfer_qr_proxies_to_transfer_app_without_redirect_loop(): void
{
$user = $this->user();
ShortLink::create([
'user_id' => $user->id,
'slug' => 'mo4o0v1t',
'source_app' => 'transfer',
'source_kind' => 'qr',
'is_managed_here' => false,
'destination_url' => 'https://ladl.link/mo4o0v1t',
'is_active' => true,
]);
Http::fake([
'https://ladill.com/q/mo4o0v1t' => Http::response('', 302, [
'Location' => 'https://ladl.link/mo4o0v1t/transfer',
]),
'https://transfer.ladill.com/q/mo4o0v1t/transfer' => Http::response('<html>Transfer files</html>', 200),
]);
$this->get('https://ladl.link/mo4o0v1t')
->assertOk()
->assertSee('Transfer files');
Http::assertSent(function ($request) {
return $request->url() === 'https://transfer.ladill.com/q/mo4o0v1t/transfer'
&& $request->hasHeader('X-Ladill-Internal', '1');
});
}
}