You are here

function advagg_get_server_schema in Advanced CSS/JS Aggregation 6

Same name and namespace in other branches
  1. 7 advagg.module \advagg_get_server_schema()

Return the server schema (http or https).

Return value

string http OR https.

5 calls to advagg_get_server_schema()
advagg_css_js_file_builder in ./advagg.module
Aggregate CSS/JS files, putting them in the files directory.
advagg_find_existing_bundle in ./advagg.module
Given a list of files, see if a bundle already exists containing all of those files. If in strict mode then the file count has to be the same.
advagg_get_filename in ./advagg.module
Given a list of files; return back the aggregated filename.
advagg_js_cdn_advagg_js_pre_alter in advagg_js_cdn/advagg_js_cdn.module
Implement hook_advagg_js_pre_alter.
advagg_processor in ./advagg.module
Process variables for page.tpl.php

File

./advagg.module, line 685
Advanced CSS/JS aggregation module

Code

function advagg_get_server_schema() {
  return isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || isset($_SERVER['HTTP_HTTPS']) && $_SERVER['HTTP_HTTPS'] == 'on' ? 'https' : 'http';
}