|
<< Click to Display Table of Contents >> Navigation: Classes > TIWProxyPortRedirection |
TIWProxyPortRedirection class allows to create HTTP/HTTPS responses which use a different port other than the one actually being used to receive the requests. This can be useful in some cases where IntraWeb application works behind a (reverse) proxy or firewall which receives incoming requests using a different port number.
Example:
•Apache Server used as a reverse proxy, listening to port 80
•IntraWeb listenign to port 8080 for incoming requests
Set:
•ServerController.ProxyPortRedirection.Active = True;
•ServerController.ProxyPortRedirection.HttpPort = 80;
This will make IntraWeb to generate responses as it was installed/listening to port 80. This enable the application to keep working on port 8080 transparently behind a reverse proxy installed on port 80.
It also allows user to force redirection from HTTP to HTTPS in ISAPI (it is much harder to do it using IIS built-in functionality).
When redirecting to HTTPS in ISAPI, this is how you should configure ServerController properties:
•ServerController.SSLOptions.NonSSLRequest = nsRedirect;
•ServerController.ProxyPortRedirection.Active = True;
•ServerController.ProxyPortRedirection.HttpsPort > 0
SIGNATURE=IWServerControllerBase.TIWProxyPortRedirection
ETYPE=Class
Declaration:
Delphi: |
public TIWProxyPortRedirection = class(TIWServerControllerPersistentProperty); |
C++: |
public: class TIWProxyPortRedirection : public TIWServerControllerPersistentProperty; |
Unit: IWServerControllerBase.pas
Description: This is class IWServerControllerBase.TIWProxyPortRedirection.