We highly recommend you stay up to date for the latest security fixes.
This looks more like a cacheing issue though. You can try running a rebuild and restart, that should reset the cache buster.
Hi all,
I have nodebb behind nginx, redirecting /forum to localhost:4567. When an user uploads a new profile picture it is shown, but if they log out and then come back again the picture is gone. If i check /api/me I can see that the image path is wrong, it puts /forum/forum/assets/uploads..., when i suppose it should be only /forum/assets/uploads...
What can i do to solve this issue? Thanks
Can you make sure the url
value in config.json is correct?
The url
value is with /forum
at the end. I have https://DOMAIN:PORT/forum
. Should it be without /forum
? Also, should it be localhost:4567
?
It should be exactly the URL at which you plan to access your site.
What version of NodeBB are you on? I seem to remember an issue like this being fixed.
@smendez-hi oh, that certain is quite old. I'd recommend backing up your site and updating NodeBB.
@pitaj I'm already in production so I will update it only if the error is solved. Otherwise i don't want to take risks because this is the only issue i have. I will try this week with my local environment and see what happens. Any issue i'll update this thread. Thanks for your help
@julian The location configuration:
location ^~ /forum {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
#rewrite ^/forum(.*) /$1 break;
proxy_pass http://127.0.0.1:4567;
proxy_redirect off;
# Socket.IO Support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
@smendez-hi Personally, I used location /forum/ {
in my nginx block, not sure if that makes a difference.
I just want to confirm: are you talking about the user avatar, or the cover image on the profile page?
@smendez-hi I just checked, and this is fixed in at least the latest version of NodeBB. It was probably fixed long ago, though.
@smendez-hi my location block:
location /forum/ {
client_max_body_size 200m;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Access-Control-Allow-Origin 'http://localhost/forum';
proxy_pass http://127.0.0.1:4567;
proxy_redirect off;
# Socket.IO Support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
Ok, thanks to both of you. In case of any news i will update this thread. But for now i will continue with this bug. We can live with this.