| Class | WeblogicPortal::ProxyController |
| In: |
lib/weblogic_portal/proxy_controller.rb
|
| Parent: | ApplicationController |
A controller to proxy http requests to WebLogic Portal, and rewrite the urls that are returned in the response body.
It is exected to be enabled by settings in weblogic_portal.yml, as:
use_proxy: true proxy_to_host: localhost proxy_to_port: 7001 proxy_to_base_url: wlpWar
See WeblogicPortal::Configuration for more details.
This proxy should will handle get and post requests, and attempts to rewrite urls in returned text so that they reference the base_url and server port rather than the proxy_to_host and proxy_to_port (which will probably be returned from the portal).
An attempt is also made to proxy headers rom the browser to portal, and back again.
The action to implement the reverse-proxy
# File lib/weblogic_portal/proxy_controller.rb, line 41
41: def proxy
42: # forward the request
43: reply = forward_request
44: # create response to render
45: resp_data = create_response reply
46: # set cookies in the response
47: set_cookies reply
48: # render the result
49: render resp_data
50: end