Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Signing verification utilities
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Seal
Building blocks
Signing verification utilities
Merge requests
!77
Resolve "Investigate issue with the caching of files in backblaze"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Investigate issue with the caching of files in backblaze"
4-investigate-issue-with-the-caching-of-files-in-backblaze
into
master
Overview
1
Commits
4
Pipelines
3
Changes
4
Merged
Igor Markin
requested to merge
4-investigate-issue-with-the-caching-of-files-in-backblaze
into
master
4 years ago
Overview
1
Commits
4
Pipelines
3
Changes
4
Expand
Ticket
#4 (closed)
0
0
Merge request reports
Compare
master
version 2
97caccbb
4 years ago
version 1
899faef2
4 years ago
master (base)
and
latest version
latest version
e40b28ec
4 commits,
4 years ago
version 2
97caccbb
3 commits,
4 years ago
version 1
899faef2
2 commits,
4 years ago
4 files
+
9
−
11
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
dist/services/CloudflareService.js
+
1
−
4
Options
@@ -32,10 +32,7 @@ class CloudflareService {
}
fetchFile
(
fileName
,
bucket
=
this
.
_defaultBucket
)
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
*
()
{
// v?= is a dirty fix to prevent caching of the CORS error response in case file is missing.
// Because of browser caching CORS error in case of missing file, it's not possible to retrieve it when it's being uploaded.
// Dig into https://www.backblaze.com/b2/docs/cors_rules.html and fix
const
response
=
yield
axios_1
.
default
(
`
${
this
.
_cdnUrl
}
/file/
${
bucket
}
/
${
fileName
}
?v=
${
Math
.
random
()}
`
);
const
response
=
yield
axios_1
.
default
(
`
${
this
.
_cdnUrl
}
/file/
${
bucket
}
/
${
fileName
}
`
);
const
data
=
response
.
data
;
const
uploadTime
=
response
.
headers
[
"
x-bz-upload-timestamp
"
]
?
parseInt
(
response
.
headers
[
"
x-bz-upload-timestamp
"
])
Loading