filestack / filestack-php

Official PHP SDK for Filestack - API and content management system that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
https://www.filestack.com
Apache License 2.0
56 stars 32 forks source link

fix #40 : Add support for custom CNAME #41

Closed selfsimilar closed 4 years ago

selfsimilar commented 5 years ago

This patch primarily addresses the lack of custom CNAME support for urls that might get used in HTML templates populated by a server, so that client browsers will request resources via the custom CNAME.

This patch DOES NOT try convert all server-side requests to use the custom CNAME as we assume that the server running this API client will not have issues communicating with Filestack servers directly.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 8d9b375955f43cd0c63e64d7f8779f2604b71303 on selfsimilar:contrib/issue-40 into 5396650b246969fec929fdd2c6ab908adb5b28e2 on filestack:master.

selfsimilar commented 5 years ago

I restored PHP5.x compatibility by removing any CNAME validation. Validation is absent in the JavaScript API Client library, so I assume validation is unnecessary in this library as well.

selfsimilar commented 5 years ago

Improved testing coverage by refactoring getCustomUrl.