YunoHost-Apps / redirect_ynh

Redirection app for YunoHost
GNU Affero General Public License v3.0
43 stars 21 forks source link

Trailing slash in location needed #7

Open arthurzenika opened 6 years ago

arthurzenika commented 6 years ago

We have a web application that when behind nginx, needs to have a trailing slash, so the default config :

location /demo {
  proxy_path  http://internal.example.org:8080/;
[snip]

Needs to be modified to

location /demo/ {
  proxy_path  http://internal.example.org:8080/;
[snip]

The "path" key in settings does include that trailing slash

settings: 
  domain: example.org
  id: redirect
  [snip]
  path: /demo/

What is the right way to do this ? In the template ? Somewhere in the configuration ?

opi commented 5 years ago

I don't remember why, but the trailing slash is removed on purpose https://github.com/YunoHost-Apps/redirect_ynh/blob/master/scripts/install#L30 ;

But if your app need it, you should edit your nginx config file in /etc/nginx/conf.d/domain.conf (or domain.conf.d/youapp.conf)

zamentur commented 2 years ago

In this pr the trailing slash will be managed like on all other apps in yunohost. https://github.com/YunoHost-Apps/redirect_ynh/pull/37