mirror of
https://github.com/imputnet/cobalt.git
synced 2026-07-18 04:52:58 -05:00
[GH-ISSUE #902] Can instances running cobalt hide the HTML content displayed on www.xx.com #11857
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lpwyz on GitHub (Nov 10, 2024).
Original GitHub issue: https://github.com/imputnet/cobalt/issues/902
problem description
Can the instance running Cobalt hide the HTML content displayed in www.xx.com? If it cannot be hidden, it can be implemented so that www.xx.com: 9000 can access the HTML and use www.xx.com: 9000 to call the interface. If it is a parsed tunnel video, the tunnel video address needs to display www.xx.com. xxxxxxxx? Can xxxx format be implemented.
I conducted a test myself using a dokcer image:
services:
cobalt-api:
image: ghcr.io/imputnet/cobalt:10
init: true
read_only: true
restart: unless-stopped
container_name: cobalt-api
ports:
#- 9000:9000/tcp
if you use a reverse proxy (such as nginx),
uncomment the next line and remove the one above (9000:9000/tcp):
environment:
replace https://api.url.example/ with your instance's url
or else tunneling functionality won't work properly
API_URL: " https://www.xxx.com/ "
if you want to use cookies for fetching data from services,
uncomment the next line & volumes section
COOKIE_PATH: "/cookies.json"
According to nginx configuration above, it can be implemented to access the www.xx.com API and return the tunnel address www.xx.com? Xxx can also download videos, but at this point, simply enter www.xx.com and the HTML will be displayed.
your instance configuration
No response
@lpwyz commented on GitHub (Nov 10, 2024):
Can someone help me
@KwiatekMiki commented on GitHub (Nov 10, 2024):
what
@lpwyz commented on GitHub (Nov 10, 2024):
I built an interface of an instance project with cobalt. The port used in the project is 9000, and then I used nginx to reverse proxy. After proxying, my interface can be posted directly at www.xx.com, plus request header parameters and URL parameters. Number, you can request this interface. Then there is a problem at this time, because I am an APP. After obtaining this video address, I have a button to copy this address. When the user sees the address returned by my url, the domain name will be exposed. At this time, I found that if I enter this domain directly on the browser Name, it will return a default html page of cobalt. I want to ask how to hide this page?
发自我的iPhone
------------------ Original ------------------
From: KwiatekMiki @.>
Date: Sun,Nov 10,2024 6:28 PM
To: imputnet/cobalt @.>
Cc: Benjamin @.>, Author @.>
Subject: Re: [imputnet/cobalt] Can instances running cobalt hide the HTMLcontent displayed on www.xx.com (Issue #902)
what
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>
@flexagoon commented on GitHub (Nov 10, 2024):
what
@lpwyz commented on GitHub (Nov 11, 2024):
For example, I used my own server, www.xxx.com, to build an instance of Cobalt with Docker, and used nginx to proxy the 9000 port of this project. However, I found an issue where if I directly enter www.xx.com in the browser, an HTML page will be displayed, which looks like this:
{
"cobalt": {
"version": "10.3.1",
"url": "https://www.xx.com",
"startTime": "1731207169798",
"durationLimit": 10800,
"services": [
"bilibili",
"bluesky",
"dailymotion",
"facebook",
"instagram",
"loom",
"ok",
"pinterest",
"reddit",
"rutube",
"snapchat",
"soundcloud",
"streamable",
"tiktok",
"tumblr",
"twitch",
"twitter",
"vine",
"vimeo",
"vk",
"youtube"
]
},
"git": {
"branch": "main",
"commit": "xxx",
"remote": "imputnet/cobalt"
}
}
Can I hide this page or modify the text content on it
@lostdusty commented on GitHub (Nov 11, 2024):
No because the frontend needs the json data on the "/" page
@lpwyz commented on GitHub (Nov 11, 2024):
Understand, the frontend needs the json data on the "/" page ,
Can I/: 9000 access this page,/directly call the interface, and the URL parameter returned by the interface is also/formatted without/9000
@dumbmoron commented on GitHub (Nov 27, 2024):
if you are asking whether the api can be hosted on the same origin as the frontend: yes, but this requires you to configure your web proxy server. this is out of scope of cobalt