Skip to content

Commit

Permalink
fix: sign only URLs that don't use an whitelisted domain.
Browse files Browse the repository at this point in the history
Previously when lazyload was not active, all URLs were signed, indifferent if the domain was whitelisted or not. 
In this case, the signing process is redundant when the domain is already whitelisted
  • Loading branch information
preda-bogdan authored and selul committed Oct 28, 2019
1 parent ecf067a commit 7813bf9
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#### [Version 2.2.1](https://github.com/Codeinwp/optimole-wp/compare/v2.2.0...v2.2.1) (2019-10-21)

* **Bug Fixes**
* gif to video setting description ([063d37b](https://github.com/Codeinwp/optimole-wp/commit/063d37b))

### [Version 2.2.0](https://github.com/Codeinwp/optimole-wp/compare/v2.1.2...v2.2.0) (2019-10-21)

* #### Bug Fixes
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ Premium users will be able to optimize images for more than 25k monthly active u

## Changelog ##

#### [Version 2.2.1](https://github.com/Codeinwp/optimole-wp/compare/v2.2.0...v2.2.1) (2019-10-21)

* **Bug Fixes**
* gif to video setting description ([063d37b](https://github.com/Codeinwp/optimole-wp/commit/063d37b))



### [Version 2.2.0](https://github.com/Codeinwp/optimole-wp/compare/v2.1.2...v2.2.0) (2019-10-21)

* #### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion inc/url_replacer.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public function build_image_url(
$args = apply_filters( 'optml_image_args', $args, $original_url );

$arguments = [
'signed' => $this->settings->use_lazyload() ? false : $this->is_allowed_site,
'signed' => $this->settings->use_lazyload() ? false : ! $this->is_allowed_site,
'apply_watermark' => apply_filters( 'optml_apply_watermark_for', true, $url ),

];
Expand Down
4 changes: 2 additions & 2 deletions optimole-wp.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: Image optimization service by Optimole
* Description: Complete handling of your website images.
* Version: 2.2.0
* Version: 2.2.1
* Author: Optimole
* Author URI: https://optimole.com
* License: GPL-2.0+
Expand Down Expand Up @@ -75,7 +75,7 @@ function optml() {
define( 'OPTML_URL', plugin_dir_url( __FILE__ ) );
define( 'OPTML_JS_CDN', 'd5jmkjjpb7yfg.cloudfront.net' );
define( 'OPTML_PATH', plugin_dir_path( __FILE__ ) );
define( 'OPTML_VERSION', '2.2.0' );
define( 'OPTML_VERSION', '2.2.1' );
define( 'OPTML_NAMESPACE', 'optml' );
define( 'OPTML_BASEFILE', __FILE__ );
// Fallback for old PHP versions when this constant is not defined.
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "optimole-wp",
"version": "2.2.0",
"version": "2.2.1",
"description": "Image optimization & CDN by Optimole",
"repository": {
"type": "git",
Expand Down
7 changes: 7 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ Premium users will be able to optimize images for more than 25k monthly active u

== Changelog ==

#### [Version 2.2.1](https://github.com/Codeinwp/optimole-wp/compare/v2.2.0...v2.2.1) (2019-10-21)

* **Bug Fixes**
* gif to video setting description ([063d37b](https://github.com/Codeinwp/optimole-wp/commit/063d37b))



### [Version 2.2.0](https://github.com/Codeinwp/optimole-wp/compare/v2.1.2...v2.2.0) (2019-10-21)

* #### Bug Fixes
Expand Down

0 comments on commit 7813bf9

Please sign in to comment.