Commit Graph

4 Commits

Author SHA1 Message Date
Brian Palmer 70639150ba api: translate absolute paths to full urls with the canvas host
This fixes image links to /equation_images/X, among other things.

As part of this, I refactored the attachment.rb secure setting to be a
domain.yml (HostUrl) setting that can be used app-wide to determine
whether to use http or https when the code doesn't have access to a Request.

Fixes #8784

I also started down the road of having notification emails/sms/etc use
https links instead of http, but there is still work to do there, refs #9190

test plan: Use the rich text editor to post to a discussion or any other
rich text field that can be retrieved via the api, and include an
equation using the equation editor. Then retrieve that post through the
api, and verify that the url to the equation image includes the canvas
hostname and protocol (http://canvas.example.com/equation_images/X
instead of just /equation_images/X)

Change-Id: Iac28bf99d2d3b33c17d5b3eb128aa6d8488570fe
Reviewed-on: https://gerrit.instructure.com/11867
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-07-02 09:53:59 -06:00
Zach Wily 316dfa3ead add protocol to all file download urls, default to https; fixes #5712
Change-Id: I65010b84471c1fd3bc555a8834c29a5547f6aae3
Reviewed-on: https://gerrit.instructure.com/6007
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-10-05 17:34:35 -06:00
Brian Palmer 821c648abd wrong key name in file_store.yml.example
Change-Id: I0aa0b568e79402ad9f4f07e249fda3248d72a9ae
Reviewed-on: https://gerrit.instructure.com/4854
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-07-29 12:52:24 -06:00
Brian Whitmer 8b8173dcc9 Initial commit.
closes #6988138
2011-01-31 18:57:29 -07:00