HTTPS support for RSS feed URL generation, fixes https://github.com/sebsauvage/MinigalNano/issues/33
Move $gallery_link definition from config.php to rss.php (prevents non-editable content in config.php
This commit is contained in:
parent
2e1021cee0
commit
9b839b2a4f
2 changed files with 9 additions and 1 deletions
|
@ -38,7 +38,6 @@ $label_noimages = "No images"; //Empty folder text
|
|||
$label_loading = "Loading..."; //Thumbnail loading text
|
||||
|
||||
//RSS SETTINGS
|
||||
$gallery_link = substr("http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 0, strlen("http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'])-7); // the -7 is to remove "rss.php"
|
||||
$description = "MiniGal Nano";
|
||||
$nb_items_rss = 25; //number ef elements to display in the feed. If you add a lot of pictures at the time, consider increasing this number
|
||||
$rss_refresh_interval = 60;//time, in seconds, between two RSS refresh. for example, 3600 = 1update max per hour, 86400 = 1/day.
|
||||
|
|
9
rss.php
9
rss.php
|
@ -1,4 +1,13 @@
|
|||
<?php
|
||||
/*==========================*/
|
||||
/*Gallery address definition*/
|
||||
/*==========================*/
|
||||
$gallery_protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
|
||||
$gallery_domain = $_SERVER['HTTP_HOST'].'/';
|
||||
$gallery_path = dirname($_SERVER['REQUEST_URI']);
|
||||
$gallery_link = $gallery_protocol.$gallery_domain.$gallery_path;
|
||||
|
||||
|
||||
/*===================*/
|
||||
/*Functions*/
|
||||
/*===================*/
|
||||
|
|
Loading…
Reference in a new issue