`add_sr()` has had, since reddit/reddit@b57dff70, a special-case when the requested page was on https, where it would ignore whatever domain it would normally set and use the current one instead. As best as we can tell, this was to prevent issues with a lack of https support on all reddit domains, eg links on `https://pay.reddit.com` pointing to `https://www.reddit.com`. This should no longer be an issue. Additionally, it has caused problems with the comment embeds, which are served from `redditmedia.com` but need to have links pointing to `www.reddit.com`. Now that this special-case doesn't exist, the function should act more intuitively. And hopefully that doesn't break anything too badly. :p The request from the comment embed javascript to get the actual embed has been going through `g.media_domain`. This in turn meant that sometimes (namely, when the embed was placed on an https page) the link to the comment was also heading through the media domain. While this works, we'd rather have users go through the standard `www.reddit.com` domain for brand, caching, and probably other infrastructure reasons.
Greetings!
This is the primary codebase that powers reddit.com.
For notices about major changes and general discussion of reddit development, subscribe to the /r/redditdev and /r/changelog subreddits.
You can also chat with us via IRC in #reddit-dev on FreeNode.
Quickstart
To set up your own instance of reddit to develop with, we have a handy install script for Ubuntu that will automatically install and configure most of the stack.
Alternatively, refer to our Install Guide for instructions on setting up reddit from scratch. Many frequently asked questions regarding local reddit installs are covered in our FAQ.
APIs
To learn more about reddit's API, check out our automated API documentation and the API wiki page. Please use a unique User-Agent string and take care to abide by our API rules.
Happy hacking!
Issues and Contribution Guidelines
Thanks for wanting to help make reddit better! First things first, though: github issues is only for confirmed, active bugs. Please submit ideas to /r/ideasfortheadmins.
Please read more on contributions in CONTRIBUTING.md.