Static Web Assets available through Share Folder Path

I have a fairly robust access control to my server using Cloudflare Access to restrict access to specific users authenticated through other means (not nextcloud authentication) prior to even being able to reach my NextCloud site.

The problem I’ve run into is sharing public links.

I have an exception in place for public access to the share path (e.g.

This, however, does not allow loading assets, so the CSS and whatever else does not load, leading the share page to look like this:

157463415-bcd69143-9f88-4f2b-9565-e61f62dab0fa (1)

An alternative I’ve seen that works very well is with Synology Photos, which will load assets for publicly shared files through the same public share path.

I did add this on GitHub as a feature request but it was closed as a “setup issue” which I don’t see it as, unless this functionality exists and I missed it.

I tested it with Firefox Developer Option (F12) and Network Analysis.
There are 118 requests to read one pdf file from a public link. :wink:

I think nobody uses your restrict access through Cloudflare. That makes no sense.

But for single files you can use the app Sharing Path (video).
But then you must allow the part of url sharingpath instead of s.
A better option is perhaps a normal webserver.

Sharing Path seems like a good option, thanks!

I don’t understand what you mean by nobody using Cloudflare access. The people I allow access to my server do, it’s a requirement I impose.

The issue is opening it up to the public. I can open that one path to share files, but the formatting of the page itself is messed up because of the restrictions.

I get that it’s not a good option with the current setup… Nextcloud is simply not setup to allow this, which is why it’s a feature request.

So my idea is a smaller, public share only interface that utilizes assets stored in the same server path. I agree, 118 requests seems like a lot to open a simple public share!

Running a normal webserver is not something I’m willing to expose completely to the internet.

I would think many people are in a similar situation which is why I shared the idea here :slightly_smiling_face:

I think Cloudflare access in this fineness. Do you think other Nextcloud via Cloudflare restrict /s/? I think not. But perhaps someone here also uses Cloudflare.

Yes. But then you can perhaps restrict the subdirectory path with Cloudflare.

Yes. Hopefully we get answers from other people to improve our knowledge.