Fossil SCM
Add --localhost option to "fossil server"
Commit
e501d7d0a6820cab4186f5d3ae32cc498c7c199f
Parent
4ee6792d4b479ab…
1 file changed
+3
+3
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -1754,10 +1754,11 @@ | ||
| 1754 | 1754 | ** to "ui" may be a directory and will function as "server" if and only if |
| 1755 | 1755 | ** the --notfound option is used. |
| 1756 | 1756 | ** |
| 1757 | 1757 | ** Options: |
| 1758 | 1758 | ** --localauth enable automatic login for requests from localhost |
| 1759 | +** --localhost listen on 127.0.0.1 only (always true for "ui") | |
| 1759 | 1760 | ** -P|--port TCPPORT listen to request on port TCPPORT |
| 1760 | 1761 | ** --th-trace trace TH1 execution (for debugging purposes) |
| 1761 | 1762 | ** --baseurl URL Use URL as the base (useful for reverse proxies) |
| 1762 | 1763 | ** --notfound URL Redirect |
| 1763 | 1764 | ** --files GLOBLIST Comma-separated list of glob patterns for static files |
| @@ -1796,10 +1797,12 @@ | ||
| 1796 | 1797 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 1797 | 1798 | isUiCmd = g.argv[1][0]=='u'; |
| 1798 | 1799 | if( isUiCmd ){ |
| 1799 | 1800 | flags |= HTTP_SERVER_LOCALHOST; |
| 1800 | 1801 | g.useLocalauth = 1; |
| 1802 | + }else if ( find_option("localhost", 0, 0)!=0 ){ | |
| 1803 | + flags |= HTTP_SERVER_LOCALHOST; | |
| 1801 | 1804 | } |
| 1802 | 1805 | find_server_repository(isUiCmd && zNotFound==0); |
| 1803 | 1806 | if( zPort ){ |
| 1804 | 1807 | int i; |
| 1805 | 1808 | for(i=strlen(zPort)-1; i>=0 && zPort[i]!=':'; i--){} |
| 1806 | 1809 |
| --- 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 |