Skip to content

A self-hosted media server and file management system

fix: manifest is served through php for no reason

aminnausin78b282a7d199
diff --git a/docker/etc/nginx/conf.d/default.conf b/docker/etc/nginx/conf.d/default.conf
index 5fcd085e..8b52b511 100644
--- a/docker/etc/nginx/conf.d/default.conf
+++ b/docker/etc/nginx/conf.d/default.conf
@@ -42,6 +42,14 @@ server {
include mime.types;
+ location = /manifest.json {
+ access_log off;
+ add_header Cache-Control "public, max-age=3600" always;
+ add_header Content-Type "application/json" always;
+ add_header X-Served-By "nginx2" always;
+ try_files $uri =404;
+ }
+
location / {
try_files $uri $uri/ /index.php?$query_string;
autoindex off;
diff --git a/routes/web.php b/routes/web.php
index 16d347b9..6cc16224 100755
--- a/routes/web.php
+++ b/routes/web.php
@@ -81,18 +81,6 @@ Route::middleware('web')->group(function () {
abort(403);
});
- Route::get('/manifest.json', function () {
- $path = public_path('manifest.json');
-
- if (! file_exists($path)) {
- abort(404);
- }
-
- return response()->file($path, [
- 'Content-Type' => 'application/json',
- ]);
- });
-
Scramble::registerUiRoute('docs/api');
Scramble::registerJsonSpecificationRoute('docs/api.json');