Example #1
0
 /**
  * Create the url and force the https protocol
  *
  * @param string		$uri
  * @param array  	$params
  * @param bool		$retain		Should we keep the get parameters?
  * @return string 
  */
 public static function secure($uri = '', $params = array(), $retain = false)
 {
     return 'https://' . CCIn::host() . static::to($uri, $params, $retain);
 }
Example #2
0
 /**
  * test request method
  */
 public function testHost()
 {
     // generate server data
     $this->fakeServerData();
     $this->assertEquals(CCIn::host(), 'local.ccf2.com');
     $this->fakeServerData(array(), array(), array('HTTP_X_FORWARDED_HOST' => 'example.com'));
     $this->assertEquals(CCIn::host(), 'example.com');
 }