Anonymous avatar Anonymous committed 0c555b8

Adding external hostname/port to be used for OpenID redirect behind a FW.

Comments (0)

Files changed (4)

Add a comment to this file

ebin/redhot2_common.beam

Binary file removed.

src/redhot2.app.src

 
   % configuration parameters similar to those in the config file specified on the command line
   {env, [{ip, {127,0,0,1}}
+	 ,{hostname, "www.redhoterlang.com"}
          ,{port, 8282}
+	 ,{external_hostname, "www.redhoterlang.com"}
+         ,{external_port, 80}
 	 ,{log_dir, "/tmp"}
 	 ,{doc_root, "./www"}
-	 ,{acl, ["http://etnt.myopenid.com/"
-                ]}
-         ,{users,[{"http://etnt.myopenid.com/",
-                   [{name, "Torbjorn Tornkvist"}
-                    ,{email, "etnt@redhoterlang.com"}]}
-                 ]}
+         ,{authors, [{"http://etnt.myopenid.com/" % Claimed OpenID
+                     ,"tobbe"                     % Nickname
+                     ,"tobbe@tornkvist.org"}      % Email,
+                    ]}
         ]
   }
 ]}.

src/redhot2_inets.erl

         inets:start(httpd,
                     [{port, redhot2_deps:get_env(port, redhot2:default_port())}
                      ,{server_name,  redhot2_deps:get_env(hostname, redhot2:hostname())}
-                     ,{bind_address,  redhot2_deps:get_env(ip, {127,0,0,1})}
+	             ,{bind_address, redhot2_deps:get_env(ip, {127,0,0,1})}
                      ,{server_root, "."}
                      ,{document_root, redhot2_deps:get_env(doc_root,"./www")}
                      ,{modules, [?MODULE]}

src/redhot2_web_login.erl

 claimed_id(ClaimedId0,ReturnPage) ->
     try
 	ClaimedId    = eopenid_lib:http_path_norm(ClaimedId0),
-        HostName     = redhot2_deps:get_env(hostname, redhot2:hostname()),
-        Port         = redhot2_deps:get_env(port, redhot2:default_port()),
+        HostName     = redhot2_deps:get_env(external_hostname, redhot2:hostname()),
+        Port         = redhot2_deps:get_env(external_port, redhot2:default_port()),
         URL          = "http://"++HostName++":"++redhot2:i2l(Port),
         Dict0        = eopenid_lib:foldf(
                          [eopenid_lib:in("openid.return_to", 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.