Skip to content
Snippets Groups Projects
Commit 7d698995 authored by TamaraGunkel's avatar TamaraGunkel
Browse files

Fixes #7 replaced hardcoded url in ajax function

parent abed9406
No related branches found
No related tags found
No related merge requests found
......@@ -30,8 +30,10 @@ define(['jquery'], function ($) {
init: function() {
$('#ltiLaunchForm').submit(function(e) {
e.preventDefault();
var ocurl = decodeURIComponent($(this).attr("action"));
$.ajax({
url: 'http://localhost:8080/lti',
url: ocurl,
crossDomain: true,
type: 'post',
xhrFields: {withCredentials: true},
......
......@@ -85,7 +85,7 @@ function filter_opencast_login() {
$params['oauth_signature_method'] = 'HMAC-SHA1';
$params['oauth_signature'] = $helper->sign("POST", $endpoint, $params, $consumersecret . '&');
$content = "<form action=\"" . $endpoint .
$content = "<form action=\"" . urlencode($endpoint) .
"\" name=\"ltiLaunchForm\" id=\"ltiLaunchForm\" method=\"post\" encType=\"application/x-www-form-urlencoded\">\n";
// Construct html form for the launch parameters.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment