Skip to content
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

Is it possible to use as a proxy? #2

Open
Zykino opened this issue Nov 29, 2023 · 0 comments
Open

Is it possible to use as a proxy? #2

Zykino opened this issue Nov 29, 2023 · 0 comments

Comments

@Zykino
Copy link

Zykino commented Nov 29, 2023

Hello, I have 2 points, the first one is very easy (but I’m not ready to do a PR right now)

-- you can load your project via the godot debug web server
-- and check the browser's network debug stuff to see what
-- content type godot's debug server is providing
local content_type_mapping = {
	html = "text/html",
	js = "application/javascript",
	png = "image/png",
	jpg = "image/jpg",                                  -- <- Added this line (but not tested, I suppose both line have the same text)
	jpeg = "image/jpeg",                              -- <- Added this line (but not tested, I suppose both line have the same text)
	wasm = "application/wasm",
	pck = "application/octet-stream",
	css = "text/css",                                       -- <- Added this line
}

(Note, maybe this list can be alphabetically ordered? or is it thematically ordered and I kinda missed it?)

The second, do you think it is possible to adapt your plugin to proxy requests?
I want to have (recreate?) a web page (html/js) that can show what my VLC is playing by using this APIs https://wiki.videolan.org/VLC_HTTP_requests/ . My problem is: if I give the html file to OBS-browser, it complains that VLC does not set a header Access-Control-Allow-Origin, some sort of CORS error (I’m not a web dev anymore but like the simplicity of HTML/CSS to design and have the user modify it).

So is it possible to easily add some proxy through this lua plugin? Like if from my js I call "http://localhost:1234/proxy?url=http://localhost:8080/requests/status.xml" with some other GET (or POST) arguments this plugin could transfer the request and response to the given url?

If it is possible I’m ok to try doing the work, at in the same time I do my web page. But I would love some guidance if you have some (I did not interact with lua much until now, even less with url/web stuffs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant