hecanjog / wctank.com

http://wctank.com
0 stars 0 forks source link

cors issue w/embeds #33

Closed hecanjog closed 9 years ago

hecanjog commented 10 years ago

Hmm, getting same origin fails when trying to dump the embed for this post: http://wctank.tumblr.com/post/33479000566/daisy

hecanjog commented 10 years ago
Object {
    album: "Stumblesome", album_art:     "http://31.media.tumblr.com/tumblr_mbtg7hQVWR1qzj5c1o1_cover.jpg", artist: "Stumblesome", audio_type: "tumblr", audio_url: "https://www.tumblr.com/audio_file/wctank/33479000566/tumblr_mbtg7hQVWR1qzj5c1"…}
    album: "Stumblesome"
    album_art: "http://31.media.tumblr.com/tumblr_mbtg7hQVWR1qzj5c1o1_cover.jpg"
    artist: "Stumblesome"
    audio_type: "tumblr"
    audio_url: "https://www.tumblr.com/audio_file/wctank/33479000566/tumblr_mbtg7hQVWR1qzj5c1"
    blog_name: "wctank"
    can_reply: false
    caption: "<p>DAISY</p>"
    date: "2012-10-13 05:21:00 GMT"
    embed: "<iframe class="tumblr_audio_player tumblr_audio_player_33479000566"         src="http://wctank.tumblr.com/post/33479000566/audio_player_iframe/wctank/tumblr_mbtg7hQVWR1qzj5c1?audio_file=https%3A%2F%2Fwww.tumblr.com%2Faudio_file%2Fwctank%2F33479000566%2Ftumblr_mbtg7hQVWR1qzj5c1" frameborder="0" allowtransparency="true" scrolling="no" width="500" height="169"></iframe>"
    followed: false
    format: "html"
    highlighted: Array[0]
    id: 33479000566
    lat: 43.05979
    liked: false
    long: -87.887695
    note_count: 6
    player: "<embed type="application/x-shockwave-flash" src="http://assets.tumblr.com/swf/audio_player.swf?audio_file=https%3A%2F%2Fwww.tumblr.com%2Faudio_file%2Fwctank%2F33479000566%2Ftumblr_mbtg7hQVWR1qzj5c1&color=FFFFFF" height="27" width="207" quality="best" wmode="opaque"></embed>"
    plays: 25
    post_url: "http://wctank.tumblr.com/post/33479000566/daisy"
    reblog_key: "lNVnvMXV"
    short_url: "http://tmblr.co/Zd10XyVBWG7s"
    slug: "daisy"
    state: "published"
    tags: Array[3]
        0: "stumblesome"
        1: "43.059790 -87.887695"
        2: "worlds"
    length: 3
    __proto__: Array[0]
    timestamp: 1350105660
    track: "2 of 20"
    track_name: "This Shit's Called Daisy"
    type: "audio"
    year: 2004
hecanjog commented 10 years ago
Uncaught SecurityError: Blocked a frame with origin "http://wctank.tumblr.com" from accessing a frame with origin "http://192.168.0.11:5000". Protocols, domains, and ports must match. tumblr_mbtg7hQVWR1qzj5c1?audio_file=https%3A%2F%2Fwww.tumblr.com%2Faudio_file%2Fwctank%2F3347900056…:5
hecanjog commented 10 years ago

Don't see any official solution from tumblr. Could maybe set document.domain = tumblr.com but that's pretty hacky.

Better might be when the post is cached to the db, fetch embed resources and dump em in...

rocksynthetic commented 9 years ago

Was an array parsing error; fixed: 6e3701a94a436c1193c6ad2a1c7ce45478c56a50.