Use relative URLs for rebuild forms

Avoid mixed-content form submissions behind Coolify by rendering internal links and form actions as relative paths.
This commit is contained in:
Power BI Dev
2026-05-03 22:06:46 +07:00
parent b95d7fed02
commit 030bb7c174
17 changed files with 35 additions and 35 deletions

View File

@@ -51,7 +51,7 @@
<div class="flex flex-wrap items-center gap-3">
<div class="rounded-md border border-[#E5E7EB] bg-[#F9FAFB] px-4 py-3 text-sm text-[#15171A]">{{ $pageDate }}</div>
<div class="rounded-md border border-[#E5E7EB] bg-[#F9FAFB] px-4 py-3 text-sm text-[#15171A]">{{ $user['nip'] }} · {{ $user['nmprodi'] }}</div>
<form method="POST" action="{{ route('legacy.logout') }}">
<form method="POST" action="{{ route('legacy.logout', [], false) }}">
@csrf
<button type="submit" class="rounded-md bg-[#15171A] px-5.5 py-2.5 text-sm font-medium text-white hover:opacity-90">Logout</button>
</form>

View File

@@ -25,10 +25,10 @@
@php
$legacyAuth = session('legacy_auth');
$legacyRole = $legacyAuth['role'] ?? null;
$spotaLogoUrl = route('assets.spota-logo');
$spotaLogoUrl = route('assets.spota-logo', [], false);
$dashboardRoute = match ($legacyRole) {
'mahasiswa' => route('dashboard.mahasiswa'),
'dosen' => route('dashboard.dosen'),
'mahasiswa' => route('dashboard.mahasiswa', [], false),
'dosen' => route('dashboard.dosen', [], false),
default => null,
};
$isDashboardShell = isset($dashboardLayout) && $dashboardLayout === true;
@@ -37,7 +37,7 @@
<header class="fixed left-0 top-0 z-40 w-full border-b border-[#E5E7EB] bg-white">
<div class="mx-auto flex max-w-[1400px] items-center justify-between px-4 py-4 sm:px-6 xl:px-8 lg:relative">
<div class="flex w-full items-center justify-between lg:w-3/12">
<a href="{{ route('home') }}" class="inline-flex items-center">
<a href="{{ route('home', [], false) }}" class="inline-flex items-center">
<img src="{{ $spotaLogoUrl }}" alt="SPOTA" class="h-11 w-auto max-w-[180px] object-contain">
</a>
</div>
@@ -45,10 +45,10 @@
@if (! $isDashboardShell)
<nav>
<ul class="flex items-center gap-10 text-sm text-[#374151]">
<li><a href="{{ route('home') }}" class="hover:text-[#15171A]">Beranda</a></li>
<li><a href="{{ route('role-login') }}" class="hover:text-[#15171A]">Pilih Akun</a></li>
<li><a href="{{ route('legacy.login', 'mahasiswa') }}" class="hover:text-[#15171A]">Mahasiswa</a></li>
<li><a href="{{ route('legacy.login', 'dosen') }}" class="hover:text-[#15171A]">Dosen</a></li>
<li><a href="{{ route('home', [], false) }}" class="hover:text-[#15171A]">Beranda</a></li>
<li><a href="{{ route('role-login', [], false) }}" class="hover:text-[#15171A]">Pilih Akun</a></li>
<li><a href="{{ route('legacy.login', 'mahasiswa', false) }}" class="hover:text-[#15171A]">Mahasiswa</a></li>
<li><a href="{{ route('legacy.login', 'dosen', false) }}" class="hover:text-[#15171A]">Dosen</a></li>
</ul>
</nav>
@else
@@ -58,14 +58,14 @@
@endif
@if ($dashboardRoute && $isDashboardShell)
<div class="flex items-center gap-3">
<a href="{{ route('role-login') }}" class="rounded-md border border-[#E5E7EB] bg-white px-5.5 py-2.5 text-sm font-medium text-[#15171A] hover:bg-[#F3F4F6]">Portal</a>
<form method="POST" action="{{ route('legacy.logout') }}">
<a href="{{ route('role-login', [], false) }}" class="rounded-md border border-[#E5E7EB] bg-white px-5.5 py-2.5 text-sm font-medium text-[#15171A] hover:bg-[#F3F4F6]">Portal</a>
<form method="POST" action="{{ route('legacy.logout', [], false) }}">
@csrf
<button type="submit" class="rounded-md bg-[#15171A] px-5.5 py-2.5 text-sm font-medium text-white hover:opacity-90">Logout</button>
</form>
</div>
@else
<a href="{{ route('legacy.login', 'mahasiswa') }}" class="rounded-md bg-[#15171A] px-5.5 py-2.5 text-sm font-medium text-white hover:opacity-90">Masuk</a>
<a href="{{ route('legacy.login', 'mahasiswa', false) }}" class="rounded-md bg-[#15171A] px-5.5 py-2.5 text-sm font-medium text-white hover:opacity-90">Masuk</a>
@endif
</div>
</div>

View File

@@ -51,7 +51,7 @@
<div class="flex flex-wrap items-center gap-3">
<div class="rounded-md border border-[#E5E7EB] bg-[#F9FAFB] px-4 py-3 text-sm text-[#15171A]">{{ $pageDate }}</div>
<div class="rounded-md border border-[#E5E7EB] bg-[#F9FAFB] px-4 py-3 text-sm text-[#15171A]">{{ $user['nim'] }} · {{ $user['nmprodi'] }}</div>
<form method="POST" action="{{ route('legacy.logout') }}">
<form method="POST" action="{{ route('legacy.logout', [], false) }}">
@csrf
<button type="submit" class="rounded-md bg-[#15171A] px-5.5 py-2.5 text-sm font-medium text-white hover:opacity-90">Logout</button>
</form>