Configuration file for nginx.

Radically improves the speed of github plugin if run on a machine near you. It acts as a cache-ing proxy server.
This commit is contained in:
Dick Hollenbeck 2015-05-26 17:12:43 +02:00 committed by Maciej Suminski
parent 775f08b2bb
commit 60bcbba585
1 changed files with 5 additions and 5 deletions

View File

@ -470,15 +470,16 @@ bool GITHUB_PLUGIN::repoURL_zipURL( const wxString& aRepoURL, string* aZipURL )
if( repo.HasServer() && repo.HasPath() ) if( repo.HasServer() && repo.HasPath() )
{ {
// scheme might be "http" or if truly github.com then "https". // scheme might be "http" or if truly github.com then "https".
wxString zip_url( repo.GetScheme() + "://" ); wxString zip_url = repo.GetScheme();
zip_url += "://";
if( repo.GetServer() == "github.com" ) if( repo.GetServer() == "github.com" )
{ {
#if 0 // A proper code path would be this one, but it is not the fastest. #if 0 // A proper code path would be this one, but it is not the fastest.
zip_url += repo.GetServer(); zip_url += repo.GetServer();
zip_url += repo.GetPath(); // path comes with a leading '/' zip_url += repo.GetPath(); // path comes with a leading '/'
zip_url += '/'; zip_url += "/archive/master.zip";
zip_url += "archive/master.zip";
#else #else
// Github issues a redirect for the "master.zip". i.e. // Github issues a redirect for the "master.zip". i.e.
// "https://github.com/liftoff-sr/pretty_footprints/archive/master.zip" // "https://github.com/liftoff-sr/pretty_footprints/archive/master.zip"
@ -491,8 +492,7 @@ bool GITHUB_PLUGIN::repoURL_zipURL( const wxString& aRepoURL, string* aZipURL )
// be slower than doing this bypass. // be slower than doing this bypass.
zip_url += "codeload.github.com"; zip_url += "codeload.github.com";
zip_url += repo.GetPath(); // path comes with a leading '/' zip_url += repo.GetPath(); // path comes with a leading '/'
zip_url += '/'; zip_url += "/zip/master";
zip_url += "zip/master";
#endif #endif
} }
else else