Terms of conditions

Hi,

I running seafile community on my raspberry. I enabled the terms of conditions via the admin webinterface and now I can’t login in my seafile.
Seafile is running under https://DOMAIN.de/seafile
After activating the terms of conditions I get a redirect to https://DOMAIN.de/terms/accept/site-terms?returnTo=/seafile/terms/accept/site-terms
Here you can see that “seafile” subfolder is missing after the domain and so I get an 404 error. I tried to disable the terms of conditions but I thing the admin settings have a higher prority. How can I disable the terms of conditons?

You can disable this via seahub config https://manual.seafile.com/config/seahub_settings_py.html

Enable system admin add T&C, all users need to accept terms before using. Defaults to False.

Since version 6.0

ENABLE_TERMS_AND_CONDITIONS = True

I tried this but with no success. The settings in the admin web interface has a higher priority as the settings in seahub_settings.

I added your suggested setting in my seahub_settings.py and restarted the seafile and seahub service but the terms and conditons are kept enabled in seafile.

I solved the problem by chaning the sqlite database with an external tool. I think this wrong redirect is an issue.

When web configuration is enabled all settings available in the database are taken from database instead of file configuration.

There was no possibility to disable the terms and conditions because of the wrong redircet. Thatswhy I used an editor for sqlite3 databases and changed the value for this setting with this tool.

Did you check your Webserver config?
Build a rule to catch the redirect problem?

I use the nginx config (nginx as a reverse proxy for seafile) that is mentioned in the seafile server manual for deploing seafile with a non-root subdomain

#### Seafile
        location /seafile {
                proxy_pass              http://127.0.0.1:8000;
                proxy_pass_header       Set-Cookie;
                proxy_set_header        X-Forwared-For $remote_addr;
                proxy_set_header        Host $host;
                proxy_set_header        X-Real-IP $remote_addr;
                proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header        X-Forwarded-Host $server_name;
                proxy_set_header        X-Forwarded-Proto https;
                access_log              /var/log/nginx/seahub.access.log;
                error_log               /var/log/nginx/seahub.error.log;
                fastcgi_read_timeout    36000;
        }

        location /seafhttp {
                rewrite ^/seafhttp(.*)$ $1 break;
                proxy_pass             http://127.0.0.1:8082;
                client_max_body_size   0;
                proxy_connect_timeout  36000s;
                proxy_read_timeout     36000s;
                proxy_send_timeout     36000s;
                proxy_set_header       X-Forwarded-For $proxy_add_x_forwarded_for;
                send_timeout           36000s;
        }

        location /seafmedia {
                rewrite ^/seafmedia(.*)$ /media$1 break;
                root /home/seafile/seafile-server-latest/seahub;
        }

I don’t know how to build a rule for the redirect problem