An open API service indexing awesome lists of open source software.

https://github.com/alex-d/supports-iframe

Tell if a URL can be loaded in an iframe
https://github.com/alex-d/supports-iframe

Last synced: about 1 year ago
JSON representation

Tell if a URL can be loaded in an iframe

Awesome Lists containing this project

README

          

# Supports Iframe

A simple API to check if a URL can be loaded inside an iframe.

## How it works?

Takes a URL like: http://localhost:8000/api?url={URL}

Example:

And checks if the URL follow those rules:

- response status must be a 2xx
- response headers does not contain `x-frame-options` set to `SAMEORIGIN` nor `DENY`

You can try it there:

- not a 2xx:
- can be loaded:
- cannot be loaded:

## See it in action

This project is used by [Column View](https://column-view.com), a tool that helps you view the mobile version of your website directly in multiple columns or helps you check multiple pages at once.

## Development

To run dev server, use `vercel dev` (`npm i -g vercel` if needed)

## Author






@Alex-D


Alexandre Demode

Development

• • •

https://twitter.com/AlexandreDemode

## License

This project is licensed under the MIT License - see [the LICENSE file](LICENSE) for details.