# Wordpress plugin receives avatar URL with HTTP protocol if site uses HTTPS and no CDN

**URL:** <https://meta.discourse.org/t/wordpress-plugin-receives-avatar-url-with-http-protocol-if-site-uses-https-and-no-cdn/58605>\
**Category:** Support\
**Created:** [3월 8, 2017, 1:09오전 UTC](https://meta.discourse.org/t/wordpress-plugin-receives-avatar-url-with-http-protocol-if-site-uses-https-and-no-cdn/58605 "2017-03-08T01:09:48Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![fortasse](https://avatars.discourse-cdn.com/v4/letter/f/d9b06d/32.png) [@fortasse](https://meta.discourse.org/u/fortasse)\
**Post date:** [3월 8, 2017, 1:09오전 UTC](https://meta.discourse.org/t/wordpress-plugin-receives-avatar-url-with-http-protocol-if-site-uses-https-and-no-cdn/58605/1 "2017-03-08T01:09:48Z")

</div>

Hello! I have a Discourse installation that should only be used over HTTPS. However, since we also serve that forum on a Tor hidden service, we cannot use the “force HTTPS” checkbox in the options menu.

This is normally all well and good, except the Wordpress plugin gets an `http` url for the “avatar\_template” value. I believe this is because `discourse/app/serializers/post_wordpress_serializer.rb` (and the other wordpress-related serializers) use `UrlHelper.absolute object.user.avatar_template`. This calls `Discourse.base_url_no_prefix` if a CDN is not configured (which is not on our site.) As such, the Wordpress plugin attempts to fetch (and embeds) the avatars over HTTP, which is less than ideal. I’m not terribly well versed in Ruby, so if this is completely incorrect I apologize. I can say for certain, however, that the API response from wordpress.json has a value of `"avatar_template":"http://forums.whonix.org/letter_avatar_proxy/v2/letter/m/d2c977/{size}.png"` even though we have the `Discourse URL` value in the Wordpress plugin settings as “[https://forums.whonix.org](https://forums.whonix.org)”

I’m not sure if this is a bug in Discourse or the Wordpress plugin (or perhaps both) but I thought I would post it here. Please redirect me to the appropriate location if this is not it.

If you need additional details, please let me know.

---

_[View the full topic](https://meta.discourse.org/t/wordpress-plugin-receives-avatar-url-with-http-protocol-if-site-uses-https-and-no-cdn/58605)._
