فهرست منبع

fix gravatar url using https

Yuki Takei 9 سال پیش
والد
کامیت
22c5165a9b
3فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 1 1
      lib/util/middlewares.js
  2. 1 1
      lib/views/me/index.html
  3. 1 1
      resource/js/components/User/UserPicture.js

+ 1 - 1
lib/util/middlewares.js

@@ -62,7 +62,7 @@ exports.swigFilters = function(app, swig) {
   // define a function for Gravatar
   // define a function for Gravatar
   const generateGravatarSrc = function(user) {
   const generateGravatarSrc = function(user) {
     const hash = md5(user.email.trim().toLowerCase());
     const hash = md5(user.email.trim().toLowerCase());
-    return `http://www.gravatar.com/avatar/${hash}`;
+    return `https://gravatar.com/avatar/${hash}`;
   };
   };
 
 
   // define a function for uploaded picture
   // define a function for uploaded picture

+ 1 - 1
lib/views/me/index.html

@@ -103,7 +103,7 @@
           <div class="radio">
           <div class="radio">
             <h4>
             <h4>
               <input type="radio" name="imagetypeForm[isGravatarEnabled]" value="true" {% if user.isGravatarEnabled %}checked="checked"{% endif %}>
               <input type="radio" name="imagetypeForm[isGravatarEnabled]" value="true" {% if user.isGravatarEnabled %}checked="checked"{% endif %}>
-              <img src="https://www.gravatar.com/avatar/00000000000000000000000000000000?s=24" /> Gravatar
+              <img src="https://gravatar.com/avatar/00000000000000000000000000000000?s=24" /> Gravatar
               <a href="https://gravatar.com/">
               <a href="https://gravatar.com/">
                 <small><i class="fa fa-external-link" aria-hidden="true"></i></small>
                 <small><i class="fa fa-external-link" aria-hidden="true"></i></small>
               </a>
               </a>

+ 1 - 1
resource/js/components/User/UserPicture.js

@@ -20,7 +20,7 @@ export default class UserPicture extends React.Component {
 
 
   generateGravatarSrc(user) {
   generateGravatarSrc(user) {
     const hash = md5(user.email.trim().toLowerCase());
     const hash = md5(user.email.trim().toLowerCase());
-    return `https://www.gravatar.com/avatar/${hash}`;
+    return `https://gravatar.com/avatar/${hash}`;
   }
   }
 
 
   getClassName() {
   getClassName() {