Skip to content

Commit 6cc0e44

Browse files
authored
Merge pull request #6771 from BOINC/dpa_jquery_url
web: get jquery from jquery.com rather than googleapis.com
2 parents ef425ac + e65abfe commit 6cc0e44

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

html/inc/util.inc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ require_once("../inc/translation.inc");
2929
require_once("../inc/profile.inc");
3030
require_once("../inc/bootstrap.inc");
3131

32+
define('JQUERY_URL', 'https://code.jquery.com/jquery-3.7.1.slim.min.js');
33+
3234
function master_url() {
3335
return parse_config(get_config() , "<master_url>");
3436
}
@@ -166,7 +168,7 @@ function send_cookie($name, $value, $permanent, $ops=false) {
166168
setcookie($name, $value, $expire, $path,
167169
'',
168170
is_https(), // if this page is secure, make cookie secure
169-
true // httponly; no JS access
171+
true // use cookie for HTTP only; no JS access
170172
);
171173
}
172174

@@ -292,7 +294,7 @@ function page_head(
292294
<html lang="en">
293295
<head>
294296
';
295-
echo '<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>';
297+
echo sprintf('<script src="%s"></script>', JQUERY_URL);
296298

297299
if (defined('GLOBAL_HEAD_EXTRA')) {
298300
echo GLOBAL_HEAD_EXTRA;

html/inc/util_ops.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ function admin_page_head($title) {
4848
function admin_page_tail() {
4949
echo sprintf('
5050
<hr><center><a href=index.php>Main page</a></center>
51-
<script src="%s/jquery.min.js"></script>
51+
<script src="%s"></script>
5252
<script src="%s/bootstrap.min.js"></script>
5353
</div>
5454
</body>
5555
</html>
5656
',
57-
secure_url_base(),
57+
JQUERY_URL,
5858
secure_url_base()
5959
);
6060
}

0 commit comments

Comments
 (0)