A simple API to check if a URL can be loaded inside an iframe.
Takes a URL like: http:https://localhost:8000/api?url={URL}
Example: http:https://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 toSAMEORIGIN
norDENY
You can try it there:
- not a 2xx: https://supports-iframe.vercel.app/api?url=https://column-view.com/404
- can be loaded: https://supports-iframe.vercel.app/api?url=https://monitoror.com
- cannot be loaded: https://supports-iframe.vercel.app/api?url=https://google.com
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.
To run dev server, use vercel dev
(npm i -g vercel
if needed)
@Alex-D Alexandre Demode Development • • • https://twitter.com/AlexandreDemode |
This project is licensed under the MIT License - see the LICENSE file for details.