Changeset 2971206
- Timestamp:
- 09/25/2023 10:26:45 AM (10 months ago)
- Location:
- arvancloud-cdn
- Files:
-
- 10 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
arvancloud-cdn/tags/0.9.10/README.txt
r2962918 r2971206 5 5 Tested up to: 6.1 6 6 Requires PHP: 7.2 7 Stable tag: 0.9. 97 Stable tag: 0.9. 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 56 56 57 57 == Changelog == 58 59 60 58 61 = 0.9.9 - 2023-09-05 = 59 62 * Fix Arvan API changes in domain info response -
arvancloud-cdn/tags/0.9.10/admin/inc/Security/class-ddos_protection.php
r2777664 r2971206 43 43 // should send request to arvancloud 44 44 45 $endpoint = '/ddos ';45 $endpoint = '/ddos'; 46 46 47 47 if ($item['name'] == 'ttl') { … … 51 51 if ( $item['name'] == 'ddos_protection_mode' ) { 52 52 $data = array( 53 " mode" => $item['value'],53 "mode" => $item['value'], 54 54 ); 55 55 } else { … … 115 115 $domain = Helper::get_site_domain(); 116 116 117 return Request_Arvan::get("domains/$domain/ddos ");117 return Request_Arvan::get("domains/$domain/ddos"); 118 118 } 119 119 120 120 public function get_mode() { 121 121 $options = self::get_options(); 122 $this->ttl = $options['ttl'] ?? false;123 122 124 return $options['mode'] ?? false; 123 $this->ttl = $options['ttl'] ?? false; 124 125 return $options['protection_mode'] ?? false; 126 } 127 128 public function get_ddos_settings(){ 129 $domain = Helper::get_site_domain(); 130 131 return Request_Arvan::get("domains/$domain/ddos/settings"); 132 } 133 public function get_status(){ 134 $settings = $this->get_ddos_settings(); 135 136 return $settings['is_enabled'] ?? false; 125 137 } 126 138 } -
arvancloud-cdn/tags/0.9.10/admin/inc/Security/class-firewall.php
r2943546 r2971206 191 191 public static function get_firewall_config() { 192 192 $domain = Helper::get_site_domain(); 193 194 return Request_Arvan::get("domains/$domain/firewall"); 193 return Request_Arvan::get("domains/$domain/firewall/settings"); 195 194 } 196 195 … … 200 199 $this->default_rule = $this->data['default_action']; 201 200 $this->verify_sni = $this->data['verify_sni']; 202 $this->rules = $this->data['rules']; 203 } 204 201 $this->rules = $this->get_rules(); 202 203 } 204 205 206 public function get_rules(){ 207 $domain = Helper::get_site_domain(); 208 $rules = Request_Arvan::get("domains/$domain/firewall/rules"); 209 if(isset($rules['status_code'])) 210 unset($rules['status_code']); 211 return $rules; 212 } 205 213 /** 206 214 * @param $status -
arvancloud-cdn/tags/0.9.10/admin/views/security/firewall_settings.php
r2752685 r2971206 12 12 <h1><?php esc_html_e('Firewall', 'arvancloud-cdn'); ?></h1> 13 13 <?php 14 if ( $cdn_plan_level == 1 && count($firewall->rules ) == 10)14 if ( $cdn_plan_level == 1 && count($firewall->rules) == 10) 15 15 echo wp_kses_post('<div class="notice notice-error is-dismissible"><p>'. esc_html__( 'You have reached the limit for the number of rules (10 rules) you can create at Basic plan. Check the Plans page for upgrades and more information.', 'arvancloud-cdn' ) .'</p></div>'); 16 16 ?> -
arvancloud-cdn/tags/0.9.10/wp-arvancloud-cdn.php
r2962918 r2971206 11 11 * Plugin URI: https://www.arvancloud.ir/fa/products/cdn 12 12 * Description: ArvanCloud CDN service caches your website content. Using this plugin, you will be able to purge and update the cached version, either manually or automatically, so that your users visit the latest version of your website at any time. 13 * Version: 0.9. 913 * Version: 0.9. 14 14 * Requires PHP: 7.2 15 15 * Author: Khorshid, ArvanCloud … … 27 27 28 28 29 define( 'ACCDN_VERSION', '0.9. 9' );29 define( 'ACCDN_VERSION', '0.9.' ); 30 30 define( 'ACCDN_NAME', __( 'ArvanCloud CDN', 'arvancloud-cdn' ) ); 31 31 define( 'ACCDN_SLUG', 'arvancloud-cdn'); -
arvancloud-cdn/trunk/README.txt
r2962918 r2971206 5 5 Tested up to: 6.1 6 6 Requires PHP: 7.2 7 Stable tag: 0.9. 97 Stable tag: 0.9. 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 56 56 57 57 == Changelog == 58 59 60 58 61 = 0.9.9 - 2023-09-05 = 59 62 * Fix Arvan API changes in domain info response -
arvancloud-cdn/trunk/admin/inc/Security/class-ddos_protection.php
r2777664 r2971206 43 43 // should send request to arvancloud 44 44 45 $endpoint = '/ddos ';45 $endpoint = '/ddos'; 46 46 47 47 if ($item['name'] == 'ttl') { … … 51 51 if ( $item['name'] == 'ddos_protection_mode' ) { 52 52 $data = array( 53 " mode" => $item['value'],53 "mode" => $item['value'], 54 54 ); 55 55 } else { … … 115 115 $domain = Helper::get_site_domain(); 116 116 117 return Request_Arvan::get("domains/$domain/ddos ");117 return Request_Arvan::get("domains/$domain/ddos"); 118 118 } 119 119 120 120 public function get_mode() { 121 121 $options = self::get_options(); 122 $this->ttl = $options['ttl'] ?? false;123 122 124 return $options['mode'] ?? false; 123 $this->ttl = $options['ttl'] ?? false; 124 125 return $options['protection_mode'] ?? false; 126 } 127 128 public function get_ddos_settings(){ 129 $domain = Helper::get_site_domain(); 130 131 return Request_Arvan::get("domains/$domain/ddos/settings"); 132 } 133 public function get_status(){ 134 $settings = $this->get_ddos_settings(); 135 136 return $settings['is_enabled'] ?? false; 125 137 } 126 138 } -
arvancloud-cdn/trunk/admin/inc/Security/class-firewall.php
r2943546 r2971206 191 191 public static function get_firewall_config() { 192 192 $domain = Helper::get_site_domain(); 193 194 return Request_Arvan::get("domains/$domain/firewall"); 193 return Request_Arvan::get("domains/$domain/firewall/settings"); 195 194 } 196 195 … … 200 199 $this->default_rule = $this->data['default_action']; 201 200 $this->verify_sni = $this->data['verify_sni']; 202 $this->rules = $this->data['rules']; 203 } 204 201 $this->rules = $this->get_rules(); 202 203 } 204 205 206 public function get_rules(){ 207 $domain = Helper::get_site_domain(); 208 $rules = Request_Arvan::get("domains/$domain/firewall/rules"); 209 if(isset($rules['status_code'])) 210 unset($rules['status_code']); 211 return $rules; 212 } 205 213 /** 206 214 * @param $status -
arvancloud-cdn/trunk/admin/views/security/firewall_settings.php
r2752685 r2971206 12 12 <h1><?php esc_html_e('Firewall', 'arvancloud-cdn'); ?></h1> 13 13 <?php 14 if ( $cdn_plan_level == 1 && count($firewall->rules ) == 10)14 if ( $cdn_plan_level == 1 && count($firewall->rules) == 10) 15 15 echo wp_kses_post('<div class="notice notice-error is-dismissible"><p>'. esc_html__( 'You have reached the limit for the number of rules (10 rules) you can create at Basic plan. Check the Plans page for upgrades and more information.', 'arvancloud-cdn' ) .'</p></div>'); 16 16 ?> -
arvancloud-cdn/trunk/wp-arvancloud-cdn.php
r2962918 r2971206 11 11 * Plugin URI: https://www.arvancloud.ir/fa/products/cdn 12 12 * Description: ArvanCloud CDN service caches your website content. Using this plugin, you will be able to purge and update the cached version, either manually or automatically, so that your users visit the latest version of your website at any time. 13 * Version: 0.9. 913 * Version: 0.9. 14 14 * Requires PHP: 7.2 15 15 * Author: Khorshid, ArvanCloud … … 27 27 28 28 29 define( 'ACCDN_VERSION', '0.9. 9' );29 define( 'ACCDN_VERSION', '0.9.' ); 30 30 define( 'ACCDN_NAME', __( 'ArvanCloud CDN', 'arvancloud-cdn' ) ); 31 31 define( 'ACCDN_SLUG', 'arvancloud-cdn');
Note: See TracChangeset
for help on using the changeset viewer.