Skip to content

Commit cf08f12

Browse files
committed
Redirect to correct protocol when project is loaded
1 parent 2b23776 commit cf08f12

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

client/modules/IDE/actions/project.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ import { redirectToProtocol, protocols } from '../../../components/forceProtocol
1414
const ROOT_URL = process.env.API_URL;
1515

1616
export function setProject(project) {
17+
const targetProtocol = project.serveSecure === true ?
18+
protocols.https :
19+
protocols.http;
20+
21+
// This will not reload if on same protocol
22+
redirectToProtocol(targetProtocol);
23+
1724
return {
1825
type: ActionTypes.SET_PROJECT,
1926
project,

0 commit comments

Comments
 (0)