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
- Host: GitHub
- URL: https://github.com/alex-d/supports-iframe
- Owner: Alex-D
- License: mit
- Created: 2020-08-10T21:49:57.000Z (almost 6 years ago)
- Default Branch: develop
- Last Pushed: 2022-12-05T16:42:20.000Z (over 3 years ago)
- Last Synced: 2025-03-31T17:55:03.863Z (about 1 year ago)
- Language: JavaScript
- Homepage: supports-iframe.vercel.app
- Size: 33.2 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
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.