Hi Jose, Thank you for your feedback !
Sebastien Le Mercredi, Janvier 04, 2023 15:59 CET, "Jose David Bravo A" ([email protected]) <[email protected]> a écrit: Hello Christian, I found the problem, SOPE is defining the appName from the URL (WORequest.m), so the first characters in the URL are defined as appName. If you don't have your nginx properly configured, any text sent before the first / encounter, will be used as appName. If you send /SOGo?something, well. The application name will be "/SOGo?something", and it will be cached, so, if a wrong request URL arrives when a resource URL is not cached, the wrong URL will be cached and used to serve subsequent requests from any user. The solution is really simple, if you have your NGINX location like this:location ^~ /SOGo {, you need to add a / at the end, like this: location ^~ /SOGo/ { The reason that SOGo is using other app data is because rewrite rules. Let's say that you have a rewrite rule from / to /SOGo. Then any request sent to / will be sent to /SOGo and it will cause that problem. Jose David Bravo Álvarez ______________________________________________________________________________ De: "users" <[email protected]> Para: "users" <[email protected]> Enviados: Miércoles, 4 de Enero 2023 9:09:24 Asunto: Re: [SOGo] Error wrong JS url in SOGo 5.8.0 Hello That is a problem with nginx. Sometimes it adds attributes from other applications, which are installed in parallel to SOGo. In your case "?ReturnUrl=%2Fwmidentity%2Fconnect%2Fauthorize%2Fcallback%3Fresponse_mode%3Dform_post%26response_type%3Dcode%2520id_token%26redirect_uri%3Dhttps%253A%252F%252Fwebmail.woa" is added after /SOGo/ There is currently no known solution, only workarounds. See https://bugs.sogo.nu/view.php?id=5332 Kind regards, Christian Mack Am 30.12.22 um 17:07 schrieb Jose David Bravo A ([email protected]): > Hello! > > My SOGo 5.8.0 is generating a wrong URL for Main.js: > <script type=“text/javascript” > src=“/SOGo?ReturnUrl=%2Fwmidentity%2Fconnect%2Fauthorize%2Fcallback%3Fresponse_mode%3Dform_post%26response_type%3Dcode%2520id_token%26redirect_uri%3Dhttps%253A%252F%252Fwebmail.woa/WebServerResources/js/Main.js?lm=1672013019"></script> > > And that URL returns a 404 error. And the page goes blank. > > The problem can be solved restarting SOGo but I'm wondering why is it > happening? > > It's also happening with the logo: > <img > src="/SOGo?ReturnUrl=%2Fwmidentity%2Fconnect%2Fauthorize%2Fcallback%3Fresponse_mode%3Dform_post%26response_type%3Dcode%2520id_token%26redirect_uri%3Dhttps%253A%252F%252Fwebmail.woa/WebServerResources/img/sogo-full.svg?lm=1672013019" > class="md-margin" alt="*" /> > > Other resources are being loaded fine! > > After restarting SOGo, it loads the js fine, as follow: > <script data-ch="3" type="text/javascript" > src="/SOGo.woa/WebServerResources/js/Main.js?lm=1672013019"></script> > > I'm loading SOGo using a nginx reverse proxy and accessing it with the URL: [ > https://webmail.domain.com/SOGo | https://webmail.domain.com/SOGo ] > > This is how Im setting the nginx reverse proxy: > > location ^~ /SOGo { > > proxy_pass http://127.0.0.1:20000; > > proxy_set_header X-Real-IP $remote_addr; > proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; > proxy_set_header Host $host; > > proxy_set_header x-webobjects-server-port $server_port; > proxy_set_header x-webobjects-server-name $host; > proxy_set_header x-webobjects-server-url https://$host; > > proxy_set_header x-webobjects-server-protocol HTTP/1.0; > > proxy_busy_buffers_size 64k; > proxy_buffers 8 64k; > proxy_buffer_size 64k; > } > > Thank you! > > > > Jose David Bravo Álvarez > > > > -- Christian Mack Universität Konstanz Kommunikations-, Informations-, Medienzentrum (KIM) Abteilung IT-Dienste Forschung, Lehre, Infrastruktur 78457 Konstanz +49 7531 88-4416
