Secure Reverse Proxy

5 views
Skip to first unread message

Anders Persson

unread,
Jan 19, 2019, 1:44:27 PM1/19/19
to Eiffel Web Framework
I decided to use a reverse proxy and started with the example: contrib/examples/web/ewf/proxy

I tried to compare it with the socket example where it is implemented both http and https but the initialization process is a little bit different and I am not sure how to upgrade the proxy example to use TLS


Anders Persson

unread,
Jan 20, 2019, 12:04:12 PM1/20/19
to Eiffel Web Framework
I changed from 

 initialize
 
-- Initialize current service.
 
do
    set_service_option
("port", 9090)

    import_service_options
(create {WSF_SERVICE_LAUNCHER_OPTIONS_FROM_INI}.make_from_file ("server.ini"))

 
end

to
initialize
local
   opts: WSF_STANDALONE_SERVICE_OPTIONS


 
do
    create opts
    
if opts.is_secure_connection_supported then
     
       opts.is_secure := True
                 opts.set_secure_protocol_to_tls_1_2
                 opts.secure_certificate := "ca.crt"
                 opts.secure_certificate_key := "ca.key"
         end


     opts
.import_ini_file_options ("server.ini")
     service_options
:= opts
 
end

Then I updated, in the project settings, the two variables ssl_supported and ssl_enabled to true

and then it seems to work to access the proxy via htttps
Reply all
Reply to author
Forward
0 new messages