(other) route /wopi/<uuid> to the WOPI item page

The WOPI page is a dynamic route keyed by item UUID, so nginx needs to
fall back to the [id].html shell when the URL is hit directly (reload,
external link). Mirrors the existing /explorer/items/[id] rule.
This commit is contained in:
Nathan Vasse
2026-04-20 14:55:14 +02:00
parent a8e71cdb38
commit eefa620702
2 changed files with 8 additions and 0 deletions

View File

@@ -21,6 +21,10 @@ server {
try_files $uri /explorer/items/[id].html;
}
location ~ "^/wopi/[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/?$" {
try_files $uri /wopi/[id].html;
}
location ~ "^/explorer/items/(favorites|my-files|recent|shared-with-me)/?$" {
try_files $uri /explorer/items/$1.html;
}

View File

@@ -94,6 +94,10 @@ server {
try_files $uri /explorer/items/[id].html;
}
location ~ "^/wopi/[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/?$" {
try_files $uri /wopi/[id].html;
}
location ~ "^/explorer/items/(favorites|my-files|recent|shared-with-me)/?$" {
try_files $uri /explorer/items/$1.html;
}