0

Is there a way to differentiate between plain HTTP(s) and AJAX requests?

My idea was to log the X-Requested-Withheader in the nginx logs, but it seems it's not set by each AJAX client.

So what is the proper way to setup nginx to be able to tell if the request was a AJAX request or not?

astropanic
  • 297
  • 2
  • 5
  • 18
  • There is no difference on the server side. Any HTTP request looks like any other. What are you really trying to accomplish here? – Michael Hampton May 15 '18 at 13:52
  • We have an application where the real first request is comming via plain HTTP, and the next concecutive requests are chunks loaded via AJAX. I wanted to find out if we can dirrerentiate in an other way than parsing the URL between those. – astropanic May 17 '18 at 08:14

0 Answers0