Sp-dev-docs: Use HTTPS for localhost?

Created on 25 Aug 2016  路  12Comments  路  Source: SharePoint/sp-dev-docs

To get workbench running, you need to manually enable mixed content loading, as O365 is HTTPS and localhost is HTTP.
If gulp would serve as HTTPS, we wouldn't have this issue? Can this be implemented?

Most helpful comment

I'll look into this today. Sounds like a pretty straightforward fix.

All 12 comments

@iclanton and I had talked about this before. Will try to dig more if this is possible and if not why.

Ping me. I've done just that for my own framework.

I got HTTPS to work on the SharePoint Framework:

spfx-https

  • in node_modules/gulp-core-build-serve/lib/ServeTask.js added https:true to gulpConnect.server on line 39
  • in ./temp/workbench.html changed all http:// urls to https://
  • in ./temp/manifests.js changed all http:// urls to https://
  • in node_modules/@microsoft/sp-client-preview/dist/sp-client-preview.js changed the URLs to https: in lines 10811 and 10812
  • in node_modules/@microsoft/sp-module-loader/dist/sp-module-loader.js changed the URL to https in line 2195

On my dev machine (OS X) I got a warning that the certificate used was untrusted but could proceed anyway. I had SSL setup in the past so can't tell what else you would need to configure on a vanilla OS X or Windows machine.

How common of a setup is to create/manage SSL setup?

@chakkaradeep express web server, browser-sync create them on the fly. All you have to do is to flip a switch to use HTTPS.
Working 99% of my time with other generators in HTTPS. It doesn't hurt even when not needed ;)
Naturally does 'yo Office' too use HTTPS by default. It won't work without.

Except the small error message you get when it is self signed.

Always using HTTPS since I'm always deploying to HTTPS. Makes it easy to catch any mix-mode errors dev-time.

I'll look into this today. Sounds like a pretty straightforward fix.

Nice :D This is awesome guys, to get feedback / fixes so quickly!

I just updated to Drop 2 and switched my local serving from HTTP to HTTPS - but how am I telling the workbench in O365 to pickup my local webpart via HTTPS?

@nyn3x - the workbench has been updated to check http and https. Once you hit your local host and accept the cert warning, you shouldn't need to do anything special in the SharePoint hosted workbench, it should "just work".

@patmill my bad. The browser denied access to the https site because of the untrusted self-signed certificate. Thus the fallback to http, which was displayed to me.

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

Was this page helpful?
0 / 5 - 0 ratings