Access-control-allow-origin

Source: Internet
Author: User
Tags cdata

When use Vastinspector to check our vast response, it tiped:

"No ' access-control-allow-origin ' header is present on the requested resource. Origin ' https://imasdk.googleapis.com ' is therefore don't allow access "on the console,

So we had to solve it, to make sure our video play smoothly.

According the docs:

access-control -allow-origin: <origin header value> access-control-allow-credentials:  
We add headers before response:
Origin: = R.header.get ("origin") W.header (). Set ("access-control-allow-origin", Origin) W.header (). Set ("access-control-allow-credentials""true" )

Then our vast can play.

andskipable vast like this:


<VASTversion= "2.0">    <AdID= "159033832">        <InLine>            <Adsystem>DoubleClick</Adsystem>            <Impression><! [Cdata[https://test.adomain.com/impression?k=598cf38025536d7377e2bcbb&p= njayohwyodawmhwwfdiyfde1otazmzgzmnw3mdqzmduwnzn8bm9ybwfsfgrvdwjszwnsawnrfdeymdb4nji3fdh8yw5kcm9pzhw2ljaumhx8c20tzzyxmg18f Hxvu3x8fhxub3jtywx8fgnvbs5wb3dlcmquy2xlyw5lcnx8fhx8fhx8ntk4y2yzodayntuznmq3mzc3ztjiy2jifduyljizljexmi4wfhx8fhx8mhwwfde4ow Mzytq3ltvimwmtndiwzi1hnzzlltgxzwnhmdi1ytmxzhx8fhnhbxn1bmd8fhxyyw5rx2nwbv9jyw1wfhwzfhx8lhrilgrilhjlfhsiy2fycmllcii6ijcwmte 5iiwiy2l0esi6imfzagj1cm4ilcjjdhiioiiwlja1iiwiy3r5cguioijjcg0ilcjwyxjzzsi6ijeilcjyyw5rijoimcisinjlcxr5cguioij2bmeilcjzzwfy y2gioiixiiwidhjhzmzpy190exblijoiyxbwin18mtuwmjqwotywmhx8mxwxmtkxnxx8fhx8fgh0dhbzoi8vcgxhes5nb29nbguuy29t]]></Impression>            <Creatives>                <CreativeID= "704305157">                    <LinearSkipoffset= "00:00:05">                        <Duration>00:00:23</Duration>                        <trackingevents>                            <TrackingEvent= "Start"><! [Cdata[https://analytics-test.adomain.com/collect?app_id=com.powerd.cleaner&advertiser_id=22&campaign_id ]]></Tracking>                            <TrackingEvent= "Midpoint"><! [Cdata[https://analytics-test.adomain.com/collect?app_id=com.powerd.cleaner&advertiser_id=22&campaign_id=                             <TrackingEvent= "complete"><! [Cdata[https://analytics-test.adomain.com/collect?app_id=com.powerd.cleaner&advertiser_id=22&campaign_id =                        <Videoclicks>                            <ClickThrough><! [Cdata[https://test.adomain.com/click?k=598cf38025536d7377e2bcbb&p=]]></ClickThrough>                            <clicktracking/>                        </Videoclicks>                        <Mediafiles>                            <MediaFileID= "1"Delivery= "Progressive"type= "Video/mp4"bitrate= "All"width= "The "Height= "720"><! [Cdata[Https://d3e8xvf8dyclkj.cloudfront.net/cdn-adn/17/08/04/13/42/5984094d8709d.mp4]]></MediaFile>                        </Mediafiles>                    </Linear>                </Creative>            </Creatives>            <Extensions>                <Extension>                    <customtracking>                        <TrackingEvent= "Skip"><! [Cdata[https://test.xxx.com/impression?k=11&p=200]]></Tracking>                    </customtracking>                </Extension>            </Extensions>        </InLine>    </Ad></VAST>

 

Access-control-allow-origin

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.