[bbb-greenlight: 2/18] Changed room joining post to hopefully fix CSRF errors (#2027)
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bbb-greenlight: 2/18] Changed room joining post to hopefully fix CSRF errors (#2027)
- Date: Fri, 18 Sep 2020 06:13:00 +0000 (UTC)
commit b23715c9066641dfbf89c48328527ac3efea33a8
Author: Ahmad Farhat <ahmad af farhat gmail com>
Date: Wed Aug 19 16:03:10 2020 -0400
Changed room joining post to hopefully fix CSRF errors (#2027)
app/assets/javascripts/wait.js | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
---
diff --git a/app/assets/javascripts/wait.js b/app/assets/javascripts/wait.js
index f619f26..6df0f09 100644
--- a/app/assets/javascripts/wait.js
+++ b/app/assets/javascripts/wait.js
@@ -52,22 +52,7 @@ $(document).on("turbolinks:load", function(){
var join_attempts = 0;
var request_to_join_meeting = function(){
- $.ajax({
- url: window.location.pathname,
- type: 'POST',
- data: {
- join_name: $(".background").attr("join-name")
- },
- headers: {
- 'Content-Type': 'application/x-www-form-urlencoded',
- 'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content')
- },
- success: function(){
- // Enqueue another trial just incase they didn't actually join.
- if(join_attempts < 4){ setTimeout(request_to_join_meeting, 10000); }
- join_attempts++;
- }
- });
+ $.post(window.location.pathname, { join_name: $(".background").attr("join-name") })
}
// Refresh the page after 2 mins and attempt to reconnect to ActionCable
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]