Skip to content

Commit 9decd23

Browse files
author
amrelbialy
committed
feat: Custom CNAME
1 parent aa597b1 commit 9decd23

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,13 @@ Your Cloudimage customer token.
189189
Cloudimage account to get one. The subscription takes less than a
190190
minute and is totally free.
191191

192+
### customDomain
193+
194+
###### Type: **String** | Default: **"cloudimage.io"** | _optional_
195+
196+
If you use a custom CNAME for your cloudimage integration, you can set it here.
197+
Note: this will disregard your token above as this should be built into the CNAME entry.
198+
192199
### baseURL
193200

194201
###### Type: **String** | Default: **"/"** | _optional_

examples/src/App.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,14 @@ const cloudimageConfig = {
852852
baseURL: 'https://jolipage.airstore.io/'
853853
};
854854
855+
856+
const cloudimageConfigWithCustomCNAMEDomain = {
857+
token: 'demo',
858+
baseURL: 'https://jolipage.airstore.io/',
859+
customDomain: 'images.airstore.io'
860+
};
861+
862+
855863
<template>
856864
<CloudimageProvider v-bind:cloudImageConfig="cloudimageConfig">
857865
<h1>Simple demo of vue-cloudimage-responsive</h1>

src/CloudImageProvider.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ export default {
1414
return {
1515
config: {
1616
token: this.cloudImageConfig.token || "",
17-
domain: "cloudimg.io",
17+
domain: this.cloudImageConfig.customDomain || 'cloudimg.io',
18+
customDomain: (this.cloudImageConfig.customDomain) || false,
1819
lazyLoading: this.cloudImageConfig.lazyLoading || true,
1920
lazyLoadOffset: this.cloudImageConfig.lazyLoadOffset || 100,
2021
placeholderBackground:

0 commit comments

Comments
 (0)