Facebook graph api JSONP format , what does the /* */ in first line signify?

后端 未结 2 389
情书的邮戳
情书的邮戳 2021-01-13 10:28

I noticed an empty comment block in JSONP output returned by facebook graph api for all methods.

URL that I called :

https://graph.facebook.com/NUMER         


        
2条回答
  •  庸人自扰
    2021-01-13 10:49

    We added this to protect against an attack where a third party site bypasses the content-type of the response by doing:

    
    
    

    Google does something similar, except they use //... + \n (e.g. http://www.google.com/calendar/feeds/developer-calendar@google.com/public/full?alt=json&callback=foo)

提交回复
热议问题