Kong / apiembed

Embeddable API code snippets for your website, blog or API documentation
https://apiembed.com
MIT License
410 stars 52 forks source link

Default target option when using targets=all #15

Open raamdev opened 9 years ago

raamdev commented 9 years ago

When using a comma separated list of all the desired targets (e.g., targets=php:curl,php:http1,php:http2,javascript:jquery,javascript:xhr,shell:curl,shell:wget,shell:httpie), some browser extensions, such as the Netcraft Extension for Google Chrome, will report the iFrame as a suspected XSS attack:

2015-04-15_18-01-16

If we change the source URL to use targets=all, the Netcraft Extension doesn't complain, however we then have no way of specifying a default target, so we end up with the default of C, which for our particular use-case doesn't make sense (we'd like to use php:curl as the default):

2015-04-15_18-21-45

If there was another option, e.g., default-target, that could be used in conjunction with targets=all, then we could specify targets=all&default-target=php:curl, so that PHP would be the default option selected in the widget.

ahmadnassri commented 9 years ago

issues described here: