Skip to content

Alex-D/supports-iframe

Repository files navigation

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: http://localhost:8000/api??url=https://example.com

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:

See it in action

This project is used by Column View, 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 for details.