Fossil SCM

Add --localhost option to "fossil server"

joel 2013-04-08 16:37 trunk
Commit e501d7d0a6820cab4186f5d3ae32cc498c7c199f
1 file changed +3
+3
--- src/main.c
+++ src/main.c
@@ -1754,10 +1754,11 @@
17541754
** to "ui" may be a directory and will function as "server" if and only if
17551755
** the --notfound option is used.
17561756
**
17571757
** Options:
17581758
** --localauth enable automatic login for requests from localhost
1759
+** --localhost listen on 127.0.0.1 only (always true for "ui")
17591760
** -P|--port TCPPORT listen to request on port TCPPORT
17601761
** --th-trace trace TH1 execution (for debugging purposes)
17611762
** --baseurl URL Use URL as the base (useful for reverse proxies)
17621763
** --notfound URL Redirect
17631764
** --files GLOBLIST Comma-separated list of glob patterns for static files
@@ -1796,10 +1797,12 @@
17961797
if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?");
17971798
isUiCmd = g.argv[1][0]=='u';
17981799
if( isUiCmd ){
17991800
flags |= HTTP_SERVER_LOCALHOST;
18001801
g.useLocalauth = 1;
1802
+ }else if ( find_option("localhost", 0, 0)!=0 ){
1803
+ flags |= HTTP_SERVER_LOCALHOST;
18011804
}
18021805
find_server_repository(isUiCmd && zNotFound==0);
18031806
if( zPort ){
18041807
int i;
18051808
for(i=strlen(zPort)-1; i>=0 && zPort[i]!=':'; i--){}
18061809
--- src/main.c
+++ src/main.c
@@ -1754,10 +1754,11 @@
1754 ** to "ui" may be a directory and will function as "server" if and only if
1755 ** the --notfound option is used.
1756 **
1757 ** Options:
1758 ** --localauth enable automatic login for requests from localhost
 
1759 ** -P|--port TCPPORT listen to request on port TCPPORT
1760 ** --th-trace trace TH1 execution (for debugging purposes)
1761 ** --baseurl URL Use URL as the base (useful for reverse proxies)
1762 ** --notfound URL Redirect
1763 ** --files GLOBLIST Comma-separated list of glob patterns for static files
@@ -1796,10 +1797,12 @@
1796 if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?");
1797 isUiCmd = g.argv[1][0]=='u';
1798 if( isUiCmd ){
1799 flags |= HTTP_SERVER_LOCALHOST;
1800 g.useLocalauth = 1;
 
 
1801 }
1802 find_server_repository(isUiCmd && zNotFound==0);
1803 if( zPort ){
1804 int i;
1805 for(i=strlen(zPort)-1; i>=0 && zPort[i]!=':'; i--){}
1806
--- src/main.c
+++ src/main.c
@@ -1754,10 +1754,11 @@
1754 ** to "ui" may be a directory and will function as "server" if and only if
1755 ** the --notfound option is used.
1756 **
1757 ** Options:
1758 ** --localauth enable automatic login for requests from localhost
1759 ** --localhost listen on 127.0.0.1 only (always true for "ui")
1760 ** -P|--port TCPPORT listen to request on port TCPPORT
1761 ** --th-trace trace TH1 execution (for debugging purposes)
1762 ** --baseurl URL Use URL as the base (useful for reverse proxies)
1763 ** --notfound URL Redirect
1764 ** --files GLOBLIST Comma-separated list of glob patterns for static files
@@ -1796,10 +1797,12 @@
1797 if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?");
1798 isUiCmd = g.argv[1][0]=='u';
1799 if( isUiCmd ){
1800 flags |= HTTP_SERVER_LOCALHOST;
1801 g.useLocalauth = 1;
1802 }else if ( find_option("localhost", 0, 0)!=0 ){
1803 flags |= HTTP_SERVER_LOCALHOST;
1804 }
1805 find_server_repository(isUiCmd && zNotFound==0);
1806 if( zPort ){
1807 int i;
1808 for(i=strlen(zPort)-1; i>=0 && zPort[i]!=':'; i--){}
1809

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button