Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No images found when using Caddy #151

Open
cuechan opened this issue Mar 18, 2023 · 1 comment
Open

No images found when using Caddy #151

cuechan opened this issue Mar 18, 2023 · 1 comment

Comments

@cuechan
Copy link

cuechan commented Mar 18, 2023

We use Caddy instead of Nginx to serve our firmware images. Somehow i am not able to get the firmware selector working with the default caddy directory index .
I am not sure if this is a configuration error on my side or if its just impossible due to hardcoded Regexps.

This config works with nginx but does not with Caddy:

// community prefix of the firmware images
community_prefix: 'gluon-ffhl-',
// firmware version regex
version_regex: '-([0-9]+.[0-9]+.[0-9]+([+-~][0-9]+)?)[.-]',

However it would be great to have this working with Caddy :)

@belzebub40k
Copy link
Collaborator

Caddy prefixes all file paths with ./ but in https://github.com/freifunk-darmstadt/gluon-firmware-selector/blob/master/app.js#L91 this is one of the patterns which are ignored. The easiest way is to simply remove the pattern from the list. I don't really see a reason to ignore paths including ./. But it might make sense to rewrite the loadDirectories function to better extract the file name even if they have any prefix.

As a workaround it should work to remove ./ from IGNORED_ELEMENTS and change community_prefix to ./gluon-ffhl-.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants