Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-37173 Stop attempting to set User-Agent from core JS

This leads to some browsers throwing warnings that it is unsafe to set the
User-Agent. It doesn't help us in any way particularly either.
  • Loading branch information...
commit b8438776db109a1dafd7db90340faa6933444e6e 1 parent 10ad21d
Andrew Nicols andrewnicols authored

Showing 2 changed files with 3 additions and 6 deletions. Show diff stats Hide diff stats

  1. +2 4 comment/comment.js
  2. +1 2  lib/form/filemanager.js
6 comment/comment.js
@@ -157,8 +157,7 @@ bodyContent: '<div class="comment-delete-confirm"><a href="#" id="confirmdelete-
157 157 scope: scope
158 158 },
159 159 headers: {
160   - 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
161   - 'User-Agent': 'MoodleComment/3.0'
  160 + 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
162 161 },
163 162 data: build_querystring(params)
164 163 };
@@ -472,8 +471,7 @@ bodyContent: '<div class="comment-delete-confirm"><a href="#" id="confirmdelete-
472 471 scope: this
473 472 },
474 473 headers: {
475   - 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
476   - 'User-Agent': 'MoodleComment/3.0'
  474 + 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
477 475 },
478 476 data: build_querystring(data)
479 477 };
3  lib/form/filemanager.js
@@ -169,8 +169,7 @@ M.form_filemanager.init = function(Y, options) {
169 169 scope: scope
170 170 },
171 171 headers: {
172   - 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
173   - 'User-Agent': 'MoodleFileManager/3.0'
  172 + 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
174 173 },
175 174 data: build_querystring(params)
176 175 };

0 comments on commit b843877

Please sign in to comment.
Something went wrong with that request. Please try again.