"timezone" parameter appended infinitely with CDN (OD-2695)
Davide Beatrici opened 5 days ago

I'm trying out a CDN to serve the pages generated by OneDev.

Unfortunately I'm encountering a critical issue: the timezone parameter (e.g. https://code.onedev.io/?timezone=Europe/Rome) is appended (&timezone=Europe/Rome) infinitely, resulting in an infinite redirect.

See: https://git.houseof.software

  • Robin Shen commented 5 days ago

    Accessing https://code.onedev.io/~projects?timezone=Europe/Rome is fine. Please tell me how to reproduce.

  • Davide Beatrici commented 5 days ago

    I left the link to my instance of OneDev that is exhibiting the issue. The CDN is KeyCDN, for reference.

  • Robin Shen commented 5 days ago

    Never worked with CDN before. I tried to set up a simple pull zone in KeyCDN with original url set to https://code.onedev.io, leaving all others default. After deployed, accessing the CDN url always reports a websocket connection error, and timezone param is not added to url.

  • Davide Beatrici commented 5 days ago

    Ah, interesting. Let me show you my settings:

    Screenshots

    Nginx configuration:

            location /wicket/websocket {
                    proxy_pass http://localhost:6610/wicket/websocket;
                    proxy_http_version 1.1;
                    proxy_set_header Upgrade $http_upgrade;
                    proxy_set_header Connection "upgrade";
            }
    
            location /~server {
                    proxy_pass http://localhost:6610/~server;
                    proxy_http_version 1.1;
                    proxy_set_header Upgrade $http_upgrade;
                    proxy_set_header Connection "upgrade";
            }
    
            location /~api/streaming {
                    proxy_pass http://localhost:6610/~api/streaming;
                    proxy_buffering off;
            }
    
            location / {
                    proxy_pass http://localhost:6610;
            }
    
  • Robin Shen commented 4 days ago

    When page is initially loaded, OneDev sends browser timezone to server by calling url:

    https://code.onedev.io/~dashboards?1-1.IBehaviorListener.2-&timezone=<time zone>&_=1770211199821
    

    But KeyCDN converts it to https://code.onedev.io/~dashboards?timezone=<timezone> for some reason, and OneDev thought that timezone is not detected as it is not expecting such url format, and trigger timezone detection again, thusly caused the infinitely appending of timezone param to url by KeyCDN.

    Even if OneDev changes to handle such case, there are numerous other cases KeyCDN incorrectly handles OneDev ajax call urls.

  • Davide Beatrici commented 4 days ago

    I will report the issue to KeyCDN, because the conversion should not happen in the first place.

    OneDev-side, do you perhaps know if we can get rid of 1-1.IBehaviorListener.2- to get a cleaner URL? I'm not familiar with Ajax.

  • Robin Shen commented 4 days ago

    This link is generated by Wicket (wicket.apache.org) and can not be changed, but it is a valid url.

  • Robin Shen commented 10 hours ago

    Closing as not a OneDev issue.

  • Robin Shen changed state to 'Closed' 10 hours ago
    Previous Value Current Value
    Open
    Closed
issue 1/1
Type
Question
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
OD-2695
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover