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

Enable handling redirects in openfoodfacts-web #10539

Open
Tracked by #10596 ...
alexgarel opened this issue Jul 12, 2024 · 0 comments
Open
Tracked by #10596 ...

Enable handling redirects in openfoodfacts-web #10539

alexgarel opened this issue Jul 12, 2024 · 0 comments
Labels
static content This lives at https://github.com/openfoodfacts/openfoodfacts-web

Comments

@alexgarel
Copy link
Member

alexgarel commented Jul 12, 2024

Problem

In openfoodfacts-web, symlinks enable pointing some urls to same content.

Sometime it's better to have redirects, for url that changed for example.

We have a lot of redirects right now directly in the nginx configuration, (see https://github.com/openfoodfacts/search-a-licious/)

It would be better if all this can be handled naturally in openfoodfacts-web.

Proposed solution

Handle this case by looking at files in openfoodfacts-web.

I think the best would be to have a file lang/texts/<lc>/<location>.redirect and inside put a URI to redirect to.

As we do for html files, at startup, we should gather those redirects, so that in display content function we are able to issue the right redirect.

@github-project-automation github-project-automation bot moved this to To discuss and validate in 🍊 Open Food Facts Server issues Jul 12, 2024
@teolemon teolemon added the static content This lives at https://github.com/openfoodfacts/openfoodfacts-web label Jul 16, 2024
@teolemon teolemon added the ✨ Feature Features or enhancements to Open Food Facts server label Aug 3, 2024
@teolemon teolemon removed the ✨ Feature Features or enhancements to Open Food Facts server label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
static content This lives at https://github.com/openfoodfacts/openfoodfacts-web
Projects
Status: To discuss and validate
2 participants