-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
X Frame Bypass not working at all. #42
Comments
@6306 any luck on the browser? aaronos is cool |
@its-pablo |
@6306 mind sharing how, it's over a month now :D |
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. |
What did you do to fix it? |
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 proxyasync 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 })
)
}
|
|
This is not working at all. I was using this to make a web browser for AaronOS. Failed to access any websites that restricts iFrames
The text was updated successfully, but these errors were encountered: