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

Send data to 4CAT behind a web server in a subfolder structure (i.e. example.com/4cat) #38

Open
rahcor opened this issue Aug 17, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@rahcor
Copy link

rahcor commented Aug 17, 2024

When 4CAT is behind a web server in a subfolder structure (i.e. example.com/4cat), the line 96 of interface.js ignores what is after the '/', thus Zeeschuimer throw an 404 error trying to connect to the 4cat API.
A temporary solution is to open the web browser console and manually set the variable: background.browser.storage.local.set({'4cat-url': 'https://example.com/4cat'})

@stijn-uva
Copy link
Member

stijn-uva commented Aug 22, 2024

Hi @rahcor, the rationale for ignoring the path after the domain name is that this is more fool-proof in situations where 4CAT is actually hosted at a (sub)domain - people can just copy and paste any 4CAT URL and Zeeschuimer will be able to reconstruct the relevant API endpoint URL from it. In our own practice we've seen that this makes a significant difference for how many people get stuck trying to upload their data to 4CAT.

I do take your point that this does not work properly when 4CAT is hosted at a sub-folder. Unfortunately it's not straightforward to reconcile the aforementioned flexibility with this. I'll have a think about whether and how we can do so...

@stijn-uva stijn-uva added the enhancement New feature or request label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants