• Resolved miketemby

    (@miketemby)


    Hello,

    How can i tell if ESI is working for nonces?

    I have script output on my page that is used for an ajax request.
    It is localised with ajax ulr and nonce used for the request (using wp_localize_script).

    I have on several occasions had problems with the nonce being expired because the page was cached several days ago, so i am trying to fix this by using ESI.

    I have turned on ESI and set in the ESI Nonce field:
    elajax-nonce max-age=86400

    ..hoping that this will set a 1 day ttl on the nonce but i have no way to tell if this is working?
    Is there anyway to see if it’s working?

    • This topic was modified 2 years, 5 months ago by miketemby.
Viewing 1 replies (of 1 total)
  • Plugin Support qtwrk

    (@qtwrk)

    no , just put elajax-nonce into the filed

    you can verify it by debug log , it will log the nonce it encouners, e.g.

    10/14/22 03:13:53.330 [xxx 1 j8S] [ESI] Appended nonce action to nonce list [action] wsf_post
    10/14/22 03:13:53.331 [xxx 1 j8S] [ESI] Appended nonce action to nonce list [action] edd\-.*
    10/14/22 03:13:53.331 [xxx 1 j8S] [ESI] Appended nonce action to nonce list [action] edd_.*
    10/14/22 03:13:53.331 [xxx 1 j8S] [ESI] Appended nonce action to nonce list [action] wpmenucart
Viewing 1 replies (of 1 total)
  • The topic ‘ESI – Nonces’ is closed to new replies.