Plugin Directory

Changeset 3328372


Ignore:
Timestamp:
07/15/2025 03:57:38 PM (9 months ago)
Author:
bidass
Message:

Cloudflare support

Location:
dastra/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • dastra/trunk/dastra.php

    r3326149 r3328372  
    22/**
    33 * @package Dastra
    4  * @version 0.1.6
     4 * @version 0.1.7
    55 * Plugin Name: Dastra
    66 * Plugin URI: http://wordpress.org/plugins/dastra/
    77 * Description: Dastra is a cookie consent management platform
    88 * Author: Dastra
    9  * Version: 0.1.6
     9 * Version: 0.1.7
    1010 * Author URI: https://dastra.eu
    1111 *
     
    4747  }
    4848
    49   $http_callback = "http" . (($_SERVER['SERVER_PORT'] == 443) ? "s://" : "://") . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
     49  $https = (
     50      (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')
     51      || (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443)
     52      || (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
     53  );
     54
     55  $protocol = $https ? 'https://' : 'http://';
     56
     57  $http_callback = $https . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    5058  $add_to_dastra_link = wp_nonce_url("https://app.dastra.eu/connect/cookie-widget?returnUrl=$http_callback", "dastra-connect");
    5159
  • dastra/trunk/readme.txt

    r3326149 r3328372  
    3838== Changelog ==
    3939
     40= 0.1.7 =
     41* Cloudflare support for callback url
     42
    4043= 0.1.6 =
    4144* Fix error in urls and update min version
Note: See TracChangeset for help on using the changeset viewer.