We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3174515 commit ef382a9Copy full SHA for ef382a9
src/baas/cdn/index.js
@@ -50,6 +50,7 @@ class Cdn {
50
delete inputs.oldState
51
const {
52
Async = false,
53
+ OnlyRefresh = false,
54
Domain,
55
Origin,
56
ServiceType = 'web',
@@ -139,6 +140,18 @@ class Cdn {
139
140
141
const cdnInfo = await getCdnByDomain(this.capi, Domain)
142
143
+ // only refresh cdn
144
+ if (cdnInfo && OnlyRefresh === true) {
145
+ // refresh cdn urls
146
+ if (RefreshCdn && RefreshCdn.Urls) {
147
+ await this.purgeCdnUrls(RefreshCdn.Urls)
148
+ }
149
+ return {
150
+ domain: Domain,
151
+ refreshUrls: RefreshCdn.Urls
152
153
154
+
155
const sourceInputs = JSON.parse(JSON.stringify(cdnInputs))
156
157
const createOrUpdateCdn = async () => {
0 commit comments