jsfviewexpiredexception

ERROR: MAC did not verify, only when accessing using domain name


I have a single domain name pointing to a single server running a JoinFaces + PrimeFaces project. When I click on a p:commandButton in a form on the server through its IP address, then everything works just fine. But when I do the same through the domain name (instead of the IP address), I get the ERROR: MAC did not verify / javax.faces.application.ViewExpiredException error. Any idea why the server would be behaving differently based on whether it is accessed through its IP address or through its domain name?


Solution

  • The issue turned out to be related to an aggressive caching configuration in CloudFlare (i.e., including the view state).