litespeedtech / lscache_wp

LiteSpeed Cache for WordPress
http://wordpress.org/plugins/litespeed-cache/
GNU General Public License v3.0
207 stars 108 forks source link

6.2 Rest API 401 #652

Open xyzulu opened 2 months ago

xyzulu commented 2 months ago

I have resolved this by rolling back to v6.1, but v6.2 (clean install) gives me a 401 error hitting this page: /wp-json/litespeed/v1/token

I'm on OLS, but this appears all plugin related.

qtwrk commented 2 months ago

changelog:

Cloud REST callback used ACL for QC ips validation.

xyzulu commented 2 months ago

I understand your words, but not how they help to resolve the issue on 6.2

I’m not able to have a new api key generated if I use 6.2

hi-hai commented 2 months ago

It is caused by IPv6 issue. We have updated the QC side to v4 to fix this issue. Please try it again. Thanks

xyzulu commented 2 months ago

Thank you, I will report back if there are an further issues.

xyzulu commented 2 months ago

I've tried this again on a new site.. using 6.2.1 and I see the same behaviour as before.. (can't reach callback url.. check firewall etc). Rolled back to 6.1, requested domain key.. all good.

Am I missing something here?

PS This was a completely different site I tried this time.

tjwebmaster commented 1 month ago

I got the same problem. Disabled all plugins and checked if REST API is enabled. Rolled back to 6.1 and now it is working again.

xyzulu commented 1 month ago

Yes, this behaviour still persists on 6.2 (fails). There is a discussion here on the issue too: https://wordpress.org/support/topic/cant-generate-quic-cloud-key-with-litespeed-6-2/

(up to 3 pages now)

qtwrk commented 1 month ago

if your site is behind proxy ,like a CDN service , and server didn't configure properly to forward the IP , like PHP only sees proxy server IP , instead of true client IP , it could also lead to IP verification failed

xyzulu commented 1 month ago

@qtwrk my sites are.. as are most people's. What options do we have to work around this change that was made in 6.2 (things worked fine before).

I run sites behind Cloudflare in docker containers. Visitor IP can be correctly retrieved from the X-Forwarded-For header. Shouldn't Litespeed WP cache be using this? Something has changed in 6.2.. but I'm not a developer.. only a systems admin.

qtwrk commented 1 month ago

please go to LiteSpeed WebAdmin Console > Configuration > General Settings and set Use Client IP in Header to Trusted IP Only

tjwebmaster commented 1 month ago

I think a lot of people don't have access to the WebAdmin console (including me) so that cant be the solution right?

jstubbs34 commented 3 weeks ago

Ok, so we are having the same issue. Before 6.2 everything was working fine but now none of our customers can get domain keys and even rolling back the plugin to 6.1 doesn't get the domain key. I'm not sure what you guys did but it worked now it doesn't and yes our LiteSpeed has Use Client IP in Header set to Trusted IP Only. This is pretty frustrating because nothing we have tried is working and our customers are getting pissed which is totally understandable considering things were working fine until whatever you changed broke everything. It's almost worth dropping LiteSpeed and just rolling out nginx with Bunny CDN because this is just crazy to break so many servers and to piss off so many customers over some change concerning IP's. Like the saying goes if it isn't broken don't try to fix it. LiteSpeed ran fine now it's just an expensive software that does nothing I can use a free software like nginx and get the same result and pocket the cash we are spending on LSWS.

qtwrk commented 3 weeks ago

if you still have issue on v6.1 , then it must be something else gets the way

please create a ticket , we will check further

jstubbs34 commented 3 weeks ago

if you still have issue on v6.1 , then it must be something else gets the way

please create a ticket , we will check further

Not sure how that could be considering the accounts on that server we all connected to QUIC.cloud until version 6.2 now none connect rolling back. Nothing about the server was changed so if nothing about the server has changed and everything worked fine until 6.2 then not sure what else could get in the way. Also the plugin seems to me malfunctioning because even the debug logs don't appear when enabled.