Jump to content

MassimoD

uniGUI Subscriber
  • Posts

    10
  • Joined

  • Last visited

MassimoD's Achievements

Newbie

Newbie (1/4)

1

Reputation

  1. 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.
  2. 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
  3. i've done a Type Cast like procedure TUniMainModule.OnMainModuleCreate(Sender: TObject); begin ... TUniGUIApplication(UniApplication).UniSession ... end; and it worked for me. Bye
  4. oh god..... found the mistake............. the name of server variable... it NEED to be prefixed with HTTP_ With this change i catch it on RawHeaders. ARequestInfo.RawHeaders.Text --> Debug Output: Connection: Keep-Alive Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8 Accept-Encoding: gzip, deflate Accept-Language: en-US,en;q=0.5 Host: localhost:8077 Max-Forwards: 10 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0 Upgrade-Insecure-Requests: 1 PROPRIETARIO: audiosales X-Original-URL: / X-Forwarded-For: 127.0.0.1:50245 X-ARR-LOG-ID: 55a3404b-6d6d-41c1-a3f9-614d7152fcd8 Process URLParamsDemo.exe (6844) Btw i'll check also if is available in UniMainModule.CommandLine.Values Many thanks!
  5. yes... but none of my variables are present... here my output ARequestInfo.RawHeaders.Text --> Debug Output: Connection: Keep-Alive Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8 Accept-Encoding: gzip, deflate Accept-Language: en-US,en;q=0.5 Host: localhost:8077 Max-Forwards: 10 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0 Upgrade-Insecure-Requests: 1 X-Original-URL: / X-Forwarded-For: 127.0.0.1:49923 X-ARR-LOG-ID: e5a44ee3-4df5-4891-9db4-238fcd65d1f5 Process URLParamsDemo.exe (9860) ARequestInfo.RawHTTPCommand --> Debug Output: GET / HTTP/1.1 Process URLParamsDemo.exe (9860) ARequestInfo.CustomHeaders--> Debug Output: ?m Process URLParamsDemo.exe (9860) I'm considering to wrong configuration in url rewrite rule...... or not? My action role is:
  6. Thanks for replay. No is not a parameter but header. As described here: https://learn.microsoft.com/en-us/iis/extensions/url-rewrite-module/url-rewrite-module-configuration-reference#using-server-variables-in-rewrite-rules i've configured my IIS url rewrite to add a specific variable that is translated in a custom header in request to server. So i need to catch that specific header in my application. This is my url rewrite role in IIS. I've two server variables called "proprietario" and "edit" with a fixed value. I suppose that this two variables are translated in specific "proprietario" and "edit" additional header when IIS do the request to local unigui application. How to retrive this two header? With dev tool of chrome or firefox i can't see them because is not the browser that add those header but IIS after rewrite to unigui. Thanks
  7. I push this question.... is there a way? Thanks.
  8. Nice idea! i've not thinked about to use JS functions... i'll try it. Thanks
  9. Hi, i'm here with my manager account for the same question. Thanks
×
×
  • Create New...