Fixes #1268 - fix issue with default protocol of https for local development
This commit is contained in:
parent
e9ddf6a8ea
commit
ce1628cd69
2 changed files with 3 additions and 2 deletions
|
@ -25,7 +25,7 @@ export function serveProject(req, res) {
|
|||
const sketchDoc = window.document;
|
||||
|
||||
const base = sketchDoc.createElement('base');
|
||||
const fullUrl = `https://${req.get('host')}${req.originalUrl}`;
|
||||
const fullUrl = `${req.protocol}://${req.get('host')}${req.originalUrl}`;
|
||||
base.href = `${fullUrl}/`;
|
||||
sketchDoc.head.appendChild(base);
|
||||
|
||||
|
|
|
@ -7,9 +7,10 @@ const router = new Router();
|
|||
router.get('/:username/sketches/:project_id/*', getProjectAsset);
|
||||
router.get('/full/:project_id/*', getProjectAsset);
|
||||
router.get('/:username/full/:project_id/*', getProjectAsset);
|
||||
router.get('/present/:project_id/*', getProjectAsset);
|
||||
router.get('/:username/present/:project_id/*', getProjectAsset);
|
||||
router.get('/embed/:project_id/*', getProjectAsset);
|
||||
router.get('/:username/embed/:project_id/*', getProjectAsset);
|
||||
router.get('/:username/present/:project_id/*', getProjectAsset);
|
||||
|
||||
router.get('/sketches/:project_id/assets/*?', getFileContent);
|
||||
|
||||
|
|
Loading…
Reference in a new issue