Title: Basic Auth addition
Last modified: March 24, 2017

---

# Basic Auth addition

 *  [notzippy](https://wordpress.org/support/users/notzippy/)
 * (@notzippy)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/basic-auth-addition/)
 * A helpful and very simple addition you can add that would improve this plugin
   is to add an option to allow the user to enter basic auth information, so when
   building the site your static content generate can pass the credentials and be
   allowed to access the wordpress site. The code you need to add this to is in 
   includes/class-ss-url-fetcher.php, add in the headers array to the wp_remote_get
   request like the following
 *     ```
       		$response = wp_remote_get( $url, array(
       			'timeout' => self::TIMEOUT,
       			'sslverify' => false, // not verifying SSL because all calls are local
       			'redirection' => 0, // disable redirection
       			'blocking' => true, // do not execute code until this call is complete
       			'stream' => true, // stream body content to a file
       			'filename' => $temp_filename,
                   'headers' => array(
                     'Authorization' => 'Basic ' . base64_encode( $REALM_NAME . ':' . $REALM_PASSWORD )
                   )
       		) );
       ```
   
 * This allows for the main wordpress site to be hidden
 * Nz

Viewing 1 replies (of 1 total)

 *  [Scott at Code of Conduct](https://wordpress.org/support/users/codeofconduct/)
 * (@codeofconduct)
 * [9 years ago](https://wordpress.org/support/topic/basic-auth-addition/#post-9097121)
 * Hi notzippy,
 * I’ll look into getting this added into one of the next releases. It seems there’s
   a fair bit of demand for this 🙂
 * Best,
    Scott

Viewing 1 replies (of 1 total)

The topic ‘Basic Auth addition’ is closed to new replies.

 * ![](https://ps.w.org/simply-static/assets/icon-256x256.png?rev=2443263)
 * [Simply Static - The Static Site Generator](https://wordpress.org/plugins/simply-static/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simply-static/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simply-static/)
 * [Active Topics](https://wordpress.org/support/plugin/simply-static/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simply-static/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simply-static/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Scott at Code of Conduct](https://wordpress.org/support/users/codeofconduct/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/basic-auth-addition/#post-9097121)
 * Status: not resolved