Problem with the administration panel of the Prestashop site after the installation of Cloudflare

Hello

I signed up with Cloudflare today for my e-shop on Prestashop (1.7.2.0), changed the namesevers across and everything is good to go.

However, since doing that, I can no longer access my admin panel Prestashop properly without it refreshing and getting me to log back in again. Soon as I log in, I click a tab to access a part of the admin panel and it kicks me out again. I have tried different browsers and purged my cache but nothing seems to help.

I added a rule for my url login admin panel to Disable Security, Cache Level (by pass) Bypass for the admin login page but that has made no difference when I am actually logged in.

Impossible to work correctly with the admin panel Prestashop.

Can someone please help with this.

How to reconcile Cloudflare and Prestashop?

To do so please restore the origin IPs. How to do so, is written in the docs: https://support.cloudflare.com/hc/articles/200170786

Hello and thank you for your answer.

We have made the restore the origin IPs.

I have the impression that’s better, however regularly when browsing the Prestashop back office there is a cache problem.

However when i’m working on back office url, I activated before Cloudflare Development Mode and I have some rules for my back office page
For
www.mysite.com/admin/*
Disable Security, Cache Level Bypass, Always Online Off, Browser Cache TTL 2minutes

How can i be sure to not have cache for my url admin ?

Please dont set a browser Cache here and let your application manage it.
I personally would also activate “Disable performance”

Beside that, the PageRule you chose seems to be right.

Hello and thank you very much for your answers.

I have completed my rule pages for my BO
www.mysite/admin/*
Unfortunately I still have cache problems, I have to reload my BO pages several times to see the target page displayed.

I put a screenshot of my rule page, on what point could I improve the rules?

Thanks again for your help :slight_smile:

  • Disable Security
  • Always Online : Activated
  • Cache Level : Bypass
  • Disable Apps
  • Désactiver l’analyse des performances (i don’t know if it’s Disable Performance, i haven’t other option in French about Disable Performance)

For the files that get cached in your admin area. Can you please tell us the URL path and tell us if it matches the path /admin/*.
If some files for example change and the path they get served from are /assets/css/all.min.css they obviously will be cached since the PageRules does not bypass them.

Also please check for the header and post the header here, for URLs that do still get cached.

Hello and thank you very much for your answers.

My PageRules is configured for
www.mysite/admin/*

My cache problems are directly visible from the BO either
www.mysite/admin/*

Example :

https://www.mysite/admin/index.php?controller=AdminOrders&token=7c2e228c5f00012fef7c2d0efff206f0
https://www.mysite/admin/index.php/product/catalog?_token=Txf3nyyWO0OuJ8XYqvIZVX7dzkWr_INoIQLgirCKGFM
https://www.mysite/admin/index.php?controller=AdminLogin&token=2381217deb16af81a66633c230aedcbe&logout

It matches the path /admin/*

There is no specific header, when I work on the BO all URLs respect www.mysite/admin/*

2 weeks ago I had put in maintenance the BO and sometimes by navigating through the BO I come back on this old page of maintenance, or then sometimes the images of my products do not load.

Thanks for the additional info.

There always are headers for every request. Please provide them so we can inspect them.

Thank you.

Sorry, I didn’t understand

Below is the header of the Front and Back Office

Front Office

Header
https://www.webrankinfo.com/outils/header.php?url=http%3A%2F%2Fwww.mac-and-beauty.com&ua=internaute

URL : http://www.mac-and-beauty.com/
CODE HTTP : 301
HEADERS :
GET / HTTP/1.1
Host: www.mac-and-beauty.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36
Accept-Encoding: gzip,deflate
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
Accept-Language: fr-fr,fr;q=0.7,en-us;q=0.5,en;q=0.3
Keep-Alive: 300

URL : https://www.mac-and-beauty.com/
CODE HTTP : 301
HEADERS :
GET / HTTP/2
Host: www.mac-and-beauty.com
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36
accept-encoding: gzip,deflate
accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
accept-language: fr-fr,fr;q=0.7,en-us;q=0.5,en;q=0.3
keep-alive: 300

URL : MAC&BEAUTY - Distributeur des marques : Kerarganic, Afro Love, Curly Love, Gamma Piu, HairFlair / Curlformer.
CODE HTTP : 200
HEADERS :
GET /fr/ HTTP/2
Host: www.mac-and-beauty.com
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36
accept-encoding: gzip,deflate
accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
accept-language: fr-fr,fr;q=0.7,en-us;q=0.5,en;q=0.3
keep-alive: 300

Back Office Office
https://www.mac-and-beauty.com/admin807zaqmdt/index.php

Header
https://www.webrankinfo.com/outils/header.php?url=https%3A%2F%2Fwww.mac-and-beauty.com%2Fadmin807zaqmdt%2Findex.php&ua=internaute

URL : Mac And Beauty (PrestaShop™)
CODE HTTP : 302
HEADERS :
GET /admin807zaqmdt/index.php HTTP/2
Host: www.mac-and-beauty.com
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36
accept-encoding: gzip,deflate
accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
accept-language: fr-fr,fr;q=0.7,en-us;q=0.5,en;q=0.3
keep-alive: 300

URL : Mac And Beauty (PrestaShop™)
CODE HTTP : 200
HEADERS :
GET /admin807zaqmdt/index.php?controller=AdminLogin&token=c350295a8865f1e4c395af979d049709&redirect=AdminDashboard HTTP/2
Host: www.mac-and-beauty.com
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36
accept-encoding: gzip,deflate
accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
accept-language: fr-fr,fr;q=0.7,en-us;q=0.5,en;q=0.3
keep-alive: 300

Since your URL actually is:
image

I the PageRule does not apply, since it does have a trailing slash before the asterisk.
Please remove the last slash, so it becomes:

www.mysite/admin*

Then clear ALL caches and test again.

Thank you for your help

Initialy my PageRule was for
www.mac-and-beauty.com/admin807zaqmdt/*

I have to change for
www.mac-and-beauty.com/admin807zaqmdt*

???

No you claimed your initial PageRule was:

Sorry, it’s totally my fault…

I didn’t want to specify the url of my Back Office page on a forum thinking it was confidential.

In March we had a DDOS attack that took down the site for 2 weeks before moving to Cloudflare …

I had modified on the forum
www.mac-and-beauty.com/admin807zaqmdt/*
to
www.mysite/admin/*

My apologies again …

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.