Commit 0009cfb
committed
fix(htaccess): serve .json and .ftl files statically instead of routing them to the front controller
The bundled pdf.js of files_pdfviewer loads its localization from
apps/files_pdfviewer/js/pdfjs/web/locale/locale.json and
apps/files_pdfviewer/js/pdfjs/web/locale/<lang>/viewer.ftl.
With pretty URLs enabled, both extensions are missing from the static file
exclusion of the generated front controller rule, so Apache passes the
requests to index.php, which answers 404. pdf.js then fails to initialize
and shows the alt text dialog instead of the document.
Our nginx reference configuration serves both through try_files, and so does
an Apache instance without pretty URLs, so this only brings the pretty URL
case in line with the other two.
To not widen what is reachable in the process, the package manager metadata
that the nginx configuration explicitly returns 404 for is now denied in
.htaccess as well.
Resolves: #63512
Signed-off-by: Stefan - ByteSide.io <sr@byteside.io>1 parent e8df656 commit 0009cfb
2 files changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
143 | 153 | | |
144 | 154 | | |
145 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
617 | | - | |
| 617 | + | |
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
| |||
0 commit comments