Skip to content

Commit ce1628c

Browse files
committed
Fixes #1268 - fix issue with default protocol of https for local development
1 parent e9ddf6a commit ce1628c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

server/controllers/embed.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function serveProject(req, res) {
2525
const sketchDoc = window.document;
2626

2727
const base = sketchDoc.createElement('base');
28-
const fullUrl = `https://${req.get('host')}${req.originalUrl}`;
28+
const fullUrl = `${req.protocol}://${req.get('host')}${req.originalUrl}`;
2929
base.href = `${fullUrl}/`;
3030
sketchDoc.head.appendChild(base);
3131

server/routes/asset.routes.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ const router = new Router();
77
router.get('/:username/sketches/:project_id/*', getProjectAsset);
88
router.get('/full/:project_id/*', getProjectAsset);
99
router.get('/:username/full/:project_id/*', getProjectAsset);
10+
router.get('/present/:project_id/*', getProjectAsset);
11+
router.get('/:username/present/:project_id/*', getProjectAsset);
1012
router.get('/embed/:project_id/*', getProjectAsset);
1113
router.get('/:username/embed/:project_id/*', getProjectAsset);
12-
router.get('/:username/present/:project_id/*', getProjectAsset);
1314

1415
router.get('/sketches/:project_id/assets/*?', getFileContent);
1516

0 commit comments

Comments
 (0)