Fall back to Events when platform QR proxy returns 404.
Deploy Ladill Link / deploy (push) Successful in 48s

Event pages like sales-webinar live on events.ladill.com, but ladl.link
only proxied to ladill.com/q/* — fix by retrying events.ladill.com when
the platform hub has no matching code.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-02 08:19:29 +00:00
co-authored by Cursor
parent c73a0d869b
commit 1742fb859f
4 changed files with 59 additions and 8 deletions
+28
View File
@@ -95,4 +95,32 @@ class LinkRedirectTest extends TestCase
&& $request->hasHeader('X-Ladill-Internal', '1');
});
}
public function test_event_qr_falls_back_to_events_app_when_platform_returns_404(): void
{
$user = $this->user();
ShortLink::create([
'user_id' => $user->id,
'slug' => 'sales-webinar',
'source_app' => 'events',
'source_kind' => 'qr',
'is_managed_here' => false,
'destination_url' => 'https://ladl.link/sales-webinar',
'is_active' => true,
]);
Http::fake([
'https://ladill.com/q/sales-webinar' => Http::response('Not found', 404),
'https://events.ladill.com/q/sales-webinar' => Http::response('<html>Event page</html>', 200),
]);
$this->get('https://ladl.link/sales-webinar')
->assertOk()
->assertSee('Event page');
Http::assertSent(function ($request) {
return $request->url() === 'https://events.ladill.com/q/sales-webinar'
&& $request->hasHeader('X-Ladill-Internal', '1');
});
}
}