Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable camera for not HTTPS #309

Merged
merged 2 commits into from
Feb 17, 2016
Merged

Disable camera for not HTTPS #309

merged 2 commits into from
Feb 17, 2016

Conversation

ZNick1982
Copy link
Contributor

remove camera tab in case of http connection
#306

@@ -38,8 +38,11 @@ uploadcare.namespace 'widget.tabs', (ns) ->

__checkCompatibility: ->
@getUserMedia = navigator.getUserMedia or navigator.webkitGetUserMedia or navigator.mozGetUserMedia
isHttp = window.location.protocol == 'http:'
if isHttp
uploadcare.utils.warn('Camera not allowed for HTTP connections. To get access to camera please use HTTPS connection');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uploadcare.utils is already imported. Simple utils.

@homm
Copy link
Contributor

homm commented Feb 17, 2016

The preferred solution is to disable camera at all for HTTP sites (except localhost).

I suppose current code disbles for localhost too.

@homm
Copy link
Contributor

homm commented Feb 17, 2016

👍

homm added a commit that referenced this pull request Feb 17, 2016
@homm homm merged commit 6dac202 into uploadcare:master Feb 17, 2016
@homm homm changed the title Task 306 Disable camera for not HTTPS Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants