Added a simple reverse proxy handler.
- For now, it does not support SSL connection on the target yet. - No external config file support, this is all about coding.
This commit is contained in:
38
library/server/wsf_proxy/rewriter/wsf_agent_uri_rewriter.e
Normal file
38
library/server/wsf_proxy/rewriter/wsf_agent_uri_rewriter.e
Normal file
@@ -0,0 +1,38 @@
|
||||
note
|
||||
description: "Summary description for {WSF_AGENT_URI_REWRITER}."
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
WSF_AGENT_URI_REWRITER
|
||||
|
||||
inherit
|
||||
WSF_URI_REWRITER
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
--convert
|
||||
-- make ({FUNCTION [TUPLE [WSF_REQUEST], STRING]})
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make (a_rewriter_function: like rewriter_function)
|
||||
do
|
||||
rewriter_function := a_rewriter_function
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
|
||||
rewriter_function: FUNCTION [TUPLE [WSF_REQUEST], STRING]
|
||||
|
||||
feature -- Conversion
|
||||
|
||||
uri (a_request: WSF_REQUEST): STRING
|
||||
-- <Precursor>.
|
||||
do
|
||||
Result := rewriter_function (a_request)
|
||||
end
|
||||
|
||||
end
|
||||
16
library/server/wsf_proxy/rewriter/wsf_uri_rewriter.e
Normal file
16
library/server/wsf_proxy/rewriter/wsf_uri_rewriter.e
Normal file
@@ -0,0 +1,16 @@
|
||||
note
|
||||
description: "Summary description for {WSF_URI_REWRITER}."
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
deferred class
|
||||
WSF_URI_REWRITER
|
||||
|
||||
feature -- Conversion
|
||||
|
||||
uri (a_request: WSF_REQUEST): STRING
|
||||
-- Rewritten request uri based on `a_request'.
|
||||
deferred
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user