Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

adds absolute path to oembed GET as DEFAULT_ENDPOINT is not supported #163

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/instagram/client/embedding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module Embedding
def oembed(*args)
url = args.first
return nil unless url
get("oembed?url=#{url}", {}, false, false, true)
get("/https://api.instagram.com/oembed?url=#{url}", {}, false, false, true)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just change this to:

get("/oembed?url=#{url}", {}, false, false, true)

That's how we've monkey-patched it to fix it. That way, it still uses the configuration's endpoint, but throws away the /v1 path.

end
end
end
Expand Down