mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: S3Cdn link clicks weren't working
This commit is contained in:
@@ -144,6 +144,24 @@ describe TopicLinkClick do
|
||||
|
||||
end
|
||||
|
||||
context "s3 cdns" do
|
||||
|
||||
it "works with s3 urls" do
|
||||
SiteSetting.s3_cdn_url = "https://discourse-s3-cdn.global.ssl.fastly.net"
|
||||
|
||||
post = Fabricate(:post, topic: @topic, raw: "[test](//test.localhost/uploads/default/my-test-link)")
|
||||
TopicLink.extract_from(post)
|
||||
|
||||
url = TopicLinkClick.create_from(
|
||||
url: "https://discourse-s3-cdn.global.ssl.fastly.net/my-test-link",
|
||||
topic_id: @topic.id,
|
||||
ip: '127.0.0.3')
|
||||
|
||||
expect(url).to be_present
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context 'with a HTTPS version of the same URL' do
|
||||
|
||||
Reference in New Issue
Block a user