Allowing HTTP links from localhost to local files in Safari
0
votes
0
answers
120
views
I have a Laravel view (hosted locally on my machine via Herd) that contains about 1,500 images, each with some text. The images are smaller, reduced-size thumbnails of original files; the thumbnails are stored in the Github project folder (taking up about 150 MB in total), but the original files (about 85 GB) are not.
Each thumbnail is a link to the original file on disk: ``. The objective is to be able to open the full-size image in a new tab simply by clicking the link. Most of the original files are TIFF, and since [Chrome and Firefox don’t support TIFF](https://en.wikipedia.org/wiki/Comparison_of_web_browsers#Image_format_support) (the file is downloaded instead of displayed), Safari is the only viable option for what I want.
By default, the when hovering over a link, the hand cursor is shown and the target URL is displayed in the little hover element bottom left, but clicking the link does nothing, and there are no _Open_ options in the context menu.
Disabling cross-origin restrictions in _Preferences_ > _Developer_ > _Security_ makes the _Open_ options appear, but:
1. As far as I can tell, this disables **all** cross-origin restrictions, for **every** file and request type on every domain – massive security risk that I don’t really want to take
2. Right-clicking and choosing _Open link in new tab_ now works, but just clicking still doesn’t – it reloads the page with a message that, “This page was reloaded because a problem occurred” (not sure if this is a bug or due to something else).
So what I’m looking for is something that will allow me to:
- Allow links to local files from web pages, but _only_ locally hosted web pages (i.e., hosted under
localhost
or *.test
)
- Enable me to regular-click on such links and actually open the target file
**Is this currently possible in Safari?**
Asked by Janus Bahs Jacquet
(437 rep)
Nov 18, 2024, 06:44 PM