Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid more issues because people can't read release notes... #2124

Merged
merged 2 commits into from Dec 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
48 changes: 26 additions & 22 deletions resources/views/components/layouts/app.blade.php
@@ -1,29 +1,33 @@
<!DOCTYPE HTML>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="UTF-8">
<x-meta />
{{-- @include('components.meta.index') --}}

{{-- <script async defer src="{{ URL::asset(Helpers::cacheBusting('js/app.js')) }}"></script> --}}
{{-- <script async defer src="{{ URL::asset(Helpers::cacheBusting('js/webauthn.js')) }}"></script> --}}
{{-- <link type="text/css" rel="stylesheet" href="{{ URL::asset(Helpers::cacheBusting('css/filepond.css')) }}" /> --}}
{{-- <link type="text/css" rel="stylesheet" href="{{ URL::asset(Helpers::cacheBusting('dist/frontend.css')) }}"> --}}
{{-- <link type="text/css" rel="stylesheet" href="{{ URL::asset(Helpers::cacheBusting('dist/user.css')) }}"> --}}
<head>
<meta charset="UTF-8">
<x-meta />
{{-- @include('components.meta.index') --}}

{{-- @livewireStyles(['nonce' => csp_nonce('script')]) --}}
{{-- @livewireScripts(['nonce' => csp_nonce('script')]) --}}
@vite(['resources/css/app.css','resources/js/app.ts'])
</head>
<body class="antialiased bg-bg-700 w-full flex flex-row gap-0 relative">
@include('includes.svg')
<x-notifications />
@persist('left-menu')
<livewire:menus.left-menu>
{{-- <script async defer src="{{ URL::asset(Helpers::cacheBusting('js/app.js')) }}"></script> --}}
{{-- <script async defer src="{{ URL::asset(Helpers::cacheBusting('js/webauthn.js')) }}"></script> --}}
{{-- <link type="text/css" rel="stylesheet" href="{{ URL::asset(Helpers::cacheBusting('css/filepond.css')) }}" /> --}}
{{-- <link type="text/css" rel="stylesheet" href="{{ URL::asset(Helpers::cacheBusting('dist/frontend.css')) }}"> --}}
{{-- <link type="text/css" rel="stylesheet" href="{{ URL::asset(Helpers::cacheBusting('dist/user.css')) }}"> --}}

{{-- @livewireStyles(['nonce' => csp_nonce('script')]) --}}
{{-- @livewireScripts(['nonce' => csp_nonce('script')]) --}}
@vite(['resources/css/app.css','resources/js/app.ts'])
</head>

<body class="antialiased bg-bg-700 w-full flex flex-row gap-0 relative">
<x-warning-misconfiguration />
@include('includes.svg')
<x-notifications />
@persist('left-menu')
<livewire:menus.left-menu>
@endpersist('left-menu')
{{ $slot }}
<livewire:base.context-menu />
<livewire:base.modal />
<x-shortcuts />
</body>
<livewire:base.context-menu />
<livewire:base.modal />
<x-shortcuts />
</body>

</html>
28 changes: 28 additions & 0 deletions resources/views/components/warning-misconfiguration.blade.php
@@ -0,0 +1,28 @@
<div class="hidden" style="font-size: 24px; height: 100vh;">
<h1>If you can read me, it means that you misconfigured Lychee.</h1>
<p style="font-size: 20px;">Please check that:
<ul>
<li style="font-size: 20px; margin-bottom: 10px;">your
<pre style="font-size: 16px; display:inline-block; margin: 0;">APP_URL</pre> is properly set to the correct url.<br>
For example:
<pre style="font-size: 16px; display:inline-block; margin: 0;">APP_URL=https://lychee.example.com</pre>
</li>
<li style="font-size: 20px; margin-bottom: 10px;">if you are working behind a reverse proxy, that
<pre style="font-size: 16px; display:inline-block; margin: 0;">TRUSTED_PROXIES</pre> is set to the forwarding ip.<br>
For example:
<pre style="font-size: 16px; display:inline-block; margin: 0;">TRUSTED_PROXIES=*</pre><br>
Note that the wildcard value (<pre style="font-size: 16px; display:inline-block; margin: 0;">*</pre>) is a very <b>insecure</b> option and not recommended.
ildyria marked this conversation as resolved.
Show resolved Hide resolved
</li>
<li style="font-size: 20px; margin-bottom: 10px;">if you are working behind an apache reverse proxy, that
the forwarding headers are properly set.<br>
For example:
<pre style="font-size: 16px; display:inline-block; margin: 0;">RequestHeader set X-Forwarded-Proto https</pre> is set.
</li>
<li style="font-size: 20px; margin-bottom: 10px;">if the CSP is blocking your assets because serving http,
you need to force https.<br>
This is done by setting
<pre style="font-size: 16px; display:inline-block; margin: 0;">APP_FORCE_HTTPS=true</pre>
</li>
</ul>
</p>
</div>