Comments (7)
@its-pablo I got the XFrame Bypass working even though it's slow. Now I have to code the browser part. I'll tell you more when I'm finished.
What did you do to fix it?
from x-frame-bypass.
@its-pablo
I got the XFrame Bypass working even though it's slow.
Now I have to code the browser part. I'll tell you more when I'm finished.
from x-frame-bypass.
@6306 mind sharing how, it's over a month now :D
from x-frame-bypass.
just curios with cloudflare these days could we use a cors proxy simaler to how im downloading git repost in the browser
Coudflare pages cors proxy
from x-frame-bypass.
@6306 any luck on the browser? aaronos is cool
from x-frame-bypass.
Not that much of luck on the web browser in html. Can't get it to render the new URL in the textbox to render on the XFrame Bypass.
from x-frame-bypass.
just curios with cloudflare these days could we use a cors proxy simaler to how im downloading git repost in the browser
Coudflare pages cors proxy
async function handleProxyRequest(request) {
const url = getUrlParam(request)
console.log(`${request.method} ${url}`)
if (!url) {
return new Response(
Page, // or html
{
headers: { "Content-Type": "text/html" },
status: 404,
}
)
} // We done if no url were not a proxy we are a alanding page
let headers = Object.fromEntries(request.headers.entries());
console.log("Headers: ", JSON.stringify(headers, null, 2))
let response = await fetch(new Request(url, {
body: request.body,
headers: request.headers,
method: request.method,
redirect: "follow",
}))
let { readable, writable } = new TransformStream()
response.body.pipeTo(writable)
return new Response(
readable,
{
headers: response.headers,
status: response.status,
}
)
}
//FUNCTION: Extract pathname and searchParams from the request URL
function getUrlParam(request) {
const { pathname, searchParams } = new URL(request.url);
if (pathname.startsWith("/http")) {
//Modify the pathname by replacing "http:/" or "https:/" with "http://" or "https://"
return pathname
.slice(1) // Remove the leading "/"
.replace(/http:\/(?!\/)/, "http://") // Replace "http:/" with "http://"
.replace(/https:\/(?!\/)/, "https://"); // Replace "https:/" with "https://"
}
// Check if there's a "url" parameter in the searchParams, and if it starts with "http"
const searchParamsUrl = searchParams.get("url");
if (searchParamsUrl?.startsWith("http")) {
// Return the value of the "url" parameter
return searchParamsUrl;
}
// If none of the conditions are met, the function returns undefined
}
export async function onRequest(c){
return handleProxyRequest(c.request).catch(
(err) => new Response(err.stack, { status: 500 })
)
}
from x-frame-bypass.
Related Issues (20)
- Should warn users about privacy implication HOT 3
- [Request] Make proxy usage optional through an attribute
- steam doesnt work
- CORS Issue with Angular
- Firefox: Links are blue rather than styled by page
- The Iframe take 30s to show him
- it does not work for microsoft online word
- .
- Not Working in React App. HOT 1
- x-frame-bypass.js:68 Cannot load X-Frame-Bypass: Error: 400 HOT 1
- keeps loading foreever HOT 8
- about:srcdocs Error
- Doesn't work in Chrome extensions HOT 12
- Cannot navigate inside iframe HOT 2
- Scam Alert: False Vulnerability Reports from "Security Researchers" Using X-Frame-Bypass Library HOT 5
- Loading Spacedesk breaks CSS
- Loading iFrame in iFrame doesn't work
- why is google french? HOT 1
- loads for forever
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from x-frame-bypass.