Skip to content

Instantly share code, notes, and snippets.

@mrkara
Created July 13, 2020 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrkara/7f41d66a983dd8699a5da5deb52d40e5 to your computer and use it in GitHub Desktop.
Save mrkara/7f41d66a983dd8699a5da5deb52d40e5 to your computer and use it in GitHub Desktop.
[allow self signed certificates] for #ssl connection from #richdocuments on #owncloud

Put this in the try block of getDiscovery method in lib/Controller/DocumentController.php:

	$arrContextOptions=array(
						"ssl"=>array(
							"verify_peer"=>true,
							"allow_self_signed"=>true,
						),
					);
					$discovery = file_get_contents($wopiDiscovery, false, stream_context_create($arrContextOptions));

instead of this line:

$discovery = file_get_contents($wopiDiscovery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment