url – Allowing HTTP links from localhost to local files in Safari – Ask Different



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 (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?



Source link

Related Posts

About The Author

Add Comment