MassimoD Posted November 10, 2022 Share Posted November 10, 2022 Hi, i've this header sent from IIS to uniGui Service and readed from ARequestInfo.RawHeaders.Text in UniGUIServerModuleHTTPCommand: Connection: Keep-Alive Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Accept: */* Accept-Encoding: gzip, deflate Accept-Language: en-US,en;q=0.5 Host: localhost:9090 Max-Forwards: 10 Referer: http://audiosales.devweb-01/ User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0 X-Requested-With: XMLHttpRequest Origin: http://audiosales.devweb-01 X-Original-URL: /HandleEvent PROPRIETARIO: audiosales X-Forwarded-For: 192.168.70.1:53696 X-ARR-LOG-ID: b356a7d1-071a-4c8a-add8-e118d477127c Content-Length: 147 How can i read Origin or Referer header? I can read other header, but i can't get one of those. In my case: UniApplication.UniSession.RequestHeader['PROPRIETARIO'] -> Work UniApplication.UniSession.RequestHeader['X-Forwarded-For'] -> Work UniApplication.UniSession.RequestHeader['Origin'] -> Not work UniApplication.UniSession.RequestHeader['Referer'] -> Not work Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 11, 2022 Share Posted November 11, 2022 6 hours ago, MassimoD said: How can i read Origin or Referer header? Hello, Where do you want to read it? Quote Link to comment Share on other sites More sharing options...
irigsoft Posted November 11, 2022 Share Posted November 11, 2022 10 hours ago, MassimoD said: Hi, i've this header sent from IIS to uniGui Service and readed from ARequestInfo.RawHeaders.Text in UniGUIServerModuleHTTPCommand: Connection: Keep-Alive Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Accept: */* Accept-Encoding: gzip, deflate Accept-Language: en-US,en;q=0.5 Host: localhost:9090 Max-Forwards: 10 Referer: http://audiosales.devweb-01/ User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0 X-Requested-With: XMLHttpRequest Origin: http://audiosales.devweb-01 X-Original-URL: /HandleEvent PROPRIETARIO: audiosales X-Forwarded-For: 192.168.70.1:53696 X-ARR-LOG-ID: b356a7d1-071a-4c8a-add8-e118d477127c Content-Length: 147 How can i read Origin or Referer header? I can read other header, but i can't get one of those. In my case: UniApplication.UniSession.RequestHeader['PROPRIETARIO'] -> Work UniApplication.UniSession.RequestHeader['X-Forwarded-For'] -> Work UniApplication.UniSession.RequestHeader['Origin'] -> Not work UniApplication.UniSession.RequestHeader['Referer'] -> Not work Hello, try to get info in UniGUIServerModuleHTTPCommand IF ARequestInfo.RawHeaders.Values ['Origin'] <> '' then Dialogs.ShowMessage (ARequestInfo.RawHeaders.Values ['Origin']); AND ARequestInfo.Referer But can you explain why it is important to you, is it some security reasons? Quote Link to comment Share on other sites More sharing options...
MassimoD Posted November 11, 2022 Author Share Posted November 11, 2022 i try to get it from mainModule or Main form. I need it because my application run under iis reverse proxy that is called from many different address like: - subdom1.mydomain.com - subdom2.mydomain.com ... IIS reverse proxy receive request from all those urls and redirect all to localhost where unigui is active. So in unigui i need to know from wich url the connection come. i've pasted in my first post all the headers that iis transfer to localhost unigui and i can catch it on UniGUIServerModuleHTTPCommand, but seem that not all was propagated to other component in session. Many thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.