| @@ -145,9 +145,9 @@ | ||
| 145 | 145 | #region HTTP |
| 146 | 146 | #-------------------------------------------------------------------------------- |
| 147 | 147 | |
| 148 | 148 | if ( ! defined( 'WP_FS__IS_HTTP_REQUEST' ) ) { |
| 149 | - define( 'WP_FS__IS_HTTP_REQUEST', isset( $_SERVER['HTTP_HOST'] ) ); | |
| 149 | + define( 'WP_FS__IS_HTTP_REQUEST', isset( $_SERVER['HTTP_HOST'] ) && isset( $_SERVER['REQUEST_METHOD'] ) ); | |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | if ( ! defined( 'WP_FS__IS_HTTPS' ) ) { |
| 153 | 153 | define( 'WP_FS__IS_HTTPS', ( WP_FS__IS_HTTP_REQUEST && |
| @@ -207,8 +207,12 @@ | ||
| 207 | 207 | define( 'WP_FS__API_ADDRESS_LOCALHOST', 'http://api.freemius-local.com:8080' ); |
| 208 | 208 | } |
| 209 | 209 | if ( ! defined( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST' ) ) { |
| 210 | 210 | define( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST', 'http://sandbox-api.freemius:8080' ); |
| 211 | + } | |
| 212 | + | |
| 213 | + if ( ! defined( 'WP_FS__API_TIMEOUT' ) ) { | |
| 214 | + define( 'WP_FS__API_TIMEOUT', 30 ); | |
| 211 | 215 | } |
| 212 | 216 | |
| 213 | 217 | // Set API address for local testing. |
| 214 | 218 | if ( ! WP_FS__IS_PRODUCTION_MODE ) { |