Skip to content

Commit 321489e

Browse files
committed
fix: github bundles shared via URL
1 parent 9877023 commit 321489e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bundleviewer.octoprint.org",
3-
"version": "1.5.1",
3+
"version": "1.5.2",
44
"private": true,
55
"dependencies": {
66
"@emotion/react": "^11.5.0",

src/App.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,13 @@ const useStyles = makeStyles((theme) => ({
9191
}));
9292

9393
function corsRewrite(url) {
94-
const githubRegex = /^https:\/\/github\.com\/[a-zA-Z0-9_-]+\/[a-zA-Z0-9_-]+\/files\//;
94+
const githubRegex = /^https:\/\/github\.com\/user-attachments\/files\//;
9595
const forumRegex = /^https:\/\/community\.octoprint\.org\/uploads\/short-url\//;
96+
9697
if (url.match(githubRegex)) {
9798
return url.replace(
98-
"https://github.com",
99-
"https://bundleviewer.octoprint.org/bundles"
99+
"https://github.com/user-attachments/files",
100+
"https://bundleviewer.octoprint.org/bundles/github"
100101
);
101102
} else if (url.match(forumRegex)) {
102103
return url.replace(

0 commit comments

Comments
 (0)