Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Endpoints / Proxy Update #315

Merged
merged 37 commits into from
May 15, 2017
Merged

API Endpoints / Proxy Update #315

merged 37 commits into from
May 15, 2017

Conversation

jaswrks
Copy link
Contributor

@jaswrks jaswrks commented Apr 28, 2017

See: wpsharks/comet-cache#879

Summary of Changes

  • Use simple static text files on the CDN to check for the latest version.
  • Checks for the latest version now occur over http:// to avoid needing a fallback.
  • Authentication for access to the latest zip file continues to come through cometcache.com. However, we now add an identifying header: x-via-software: [internal method name] to help us identify these in logs and in rate-limiting configurations in the future.
  • Fallback URL changed from proxy.websharks-inc.net to http://update-fallback.wpsharks.io/cc-proxy, which is a new API endpoint fallback at wpsharks.io.
  • Only try the fallback URL whenever there was an SSL-related error on the primary API endpoint; i.e., avoid retrying via the proxy whenever the problem is something other than an SSL issue.
  • The API itself has been updated and now returns non-SSL download links using a new API endpoint at wpsharks.io: dls.wpsharks.com/cdn-xar. This avoids us needing to use the proxy endpoint to handle downloads too, on top of being a fallback for the initial connection. In short, the proxy is only used to handle authentication. From there, the response will include a download link that leads to dls.wpsharks.io, which delivers a file from the CDN over http://
  • Polished the update methods and stats-related methods.

@jaswrks jaswrks requested a review from raamdev April 28, 2017 23:52
@jaswrks
Copy link
Contributor Author

jaswrks commented Apr 28, 2017

@raamdev Please review when you have time. This PR includes changes from the work I did on Memcached, but you only need to review 89c92f5 here. See also, summary of changes above.

Copy link
Contributor

@raamdev raamdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woohoo! Fantastic! I just reviewed 89c92f5 and it looks great. Thanks for including the code comments—those were helpful.

I'm marking the changes to 89c92f5 approved, but I'm going to hold off merging this until I merge the PR for Memcached support—I'm still waiting for an answer to a question about further testing: #314 (comment)

@jaswrks
Copy link
Contributor Author

jaswrks commented May 12, 2017

@raamdev This branch is ready to merge.

@raamdev raamdev merged commit b18cd49 into dev May 15, 2017
@raamdev raamdev deleted the feature/879 branch May 15, 2017 20:24
raamdev added a commit to wpsharks/comet-cache that referenced this pull request Aug 8, 2017
- **New Feature: Memcached / RAM** (Pro): Comet Cache Pro now includes support for Memcached / AWS ElastiCache to serve the cache directly from RAM. This allows for a faster cache delivery than what is possible when serving the cache via disk. Memcached / AWS ElastiCache can be configured from **Dashboard → Comet Cache Pro → Plugin Options → RAM / Memcached**. See [Issue #47](#47)
- **Enhancement**: Added `Referrer-Policy` to whitelist for cachable HTTP headers. See [Issue #892](#892).
- **Bug Fix** (Pro): The Cache Statistics feature was broken when the PHP `disk_total_space()` and/or `disk_free_space()` functions were disabled by the PHP configuration. Comet Cache now handles this scenario gracefully by hiding disk-related stats when those functions are not allowed. See [Issue #775](#775)
- **Bug Fix** (Pro): The HTML Compressor was returning an empty string upon encountering an invalid UTF-8 sequence. See [Issue #871](#871) reported by a Comet Cache user.
- **Compatibility** (Pro): Many improvements to the Pro software update system, including changes to the API Endpoints and the Proxy Fallback endpoint. See [Issue #879](#879) and [Issue #315](wpsharks/comet-cache-pro#315) for full details.
- **Compatibility**: Fixed a WooCommerce compatibility issue that was generating a "Notice: id was called incorrectly. Product properties should not be accessed directly." Props @vestaxpdx. See [Issue #896](#896).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants