Score:0

"The User Agent is required to access this page" message only goes away when I clear NGINX cache

cn flag

I'm new to NGINX and can't really tell if there's a problem with it or with our app. My PHP application has a php package Device Detector that is responsible for User Agent info as well as CodeIgniter, which has a file UserAgent.php. I had an event where about 30 ppl tried accessing it. After they did the login, the message above showed up and only when we cleared NGINX cache the problem went away. We tried to replicate this error by switching GET to POST when testing the server but haven't been successful. We used loader.io to test server access and it runs fine (as do other apps on this server).Any ideas on how we could replicate it and what the problem is? Thanks

Score:1
jp flag

Most probably you have a badly coded application that blocks access when it is unable to detect "User-Agent" but returns the page with an error message with the normal HTTP 200 code instead of 403. As the return code doesn't indicate any errors then the error page gets cached and shown to all visitors until the cache is cleared.

Cris Tecelo avatar
cn flag
That makes sense, thanks. I know it's probably hard to tell but do you know if the problem could be with the CodeIgniter file UserAgent.php?
jp flag
Just search all your code files for the text of the error message.
Cris Tecelo avatar
cn flag
I have just found it. Thanks
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.