Feature/wasm remote3#2104
Conversation
31beb64 to
95e5c60
Compare
| res.set(http::field::access_control_allow_origin, "*"); | ||
| res.set(http::field::access_control_allow_methods, "GET"); | ||
|
|
||
| res.set(http::field::server, BOOST_BEAST_VERSION_STRING); |
There was a problem hiding this comment.
I think this could be something more personalized for ossia
| } | ||
| catch (const std::exception& e) | ||
| { | ||
| std::cerr << "Error: " << e.what() << '\n'; |
There was a problem hiding this comment.
Could this integrate more with Qt ?
| [&req](beast::string_view target) | ||
| { | ||
| http::response<http::string_body> res{http::status::not_found, req.version()}; | ||
| res.set(http::field::server, BOOST_BEAST_VERSION_STRING); |
There was a problem hiding this comment.
res.set(http::field::server, BOOST_BEAST_VERSION_STRING);
here we really want something that says that this is score
| [&req](beast::string_view why) | ||
| { | ||
| http::response<http::string_body> res{http::status::bad_request, req.version()}; | ||
| res.set(http::field::server, BOOST_BEAST_VERSION_STRING); |
There was a problem hiding this comment.
res.set(http::field::server, BOOST_BEAST_VERSION_STRING);
here we really want something that says that this is score
There was a problem hiding this comment.
This could be a constexpr static OSSIA_SCORE_VERSION_AGENT or something like that ?
| [&req](beast::string_view what) | ||
| { | ||
| http::response<http::string_body> res{http::status::internal_server_error, req.version()}; | ||
| res.set(http::field::server, BOOST_BEAST_VERSION_STRING); |
| SETTINGS_PARAMETER_IMPL(Enabled){QStringLiteral("RemoteControl/Enabled"), false}; | ||
| SETTINGS_PARAMETER_IMPL(WebUiPath){QStringLiteral("RemoteControl/WebUiPath"), ""}; | ||
| SETTINGS_PARAMETER_IMPL(ServerAddress){QStringLiteral("RemoteControl/ServerAddress"), "0.0.0.0"}; | ||
| SETTINGS_PARAMETER_IMPL(ServerPort){QStringLiteral("RemoteControl/ServerPort"), 8080}; |
There was a problem hiding this comment.
Maybe we should pick a less common port by default ?
| add_library(${PROJECT_NAME} ${SRCS} ${HDRS} ${QRCS}) | ||
|
|
||
| target_link_libraries(${PROJECT_NAME} PUBLIC score_plugin_scenario score_plugin_js ${QT_PREFIX}::WebSockets) | ||
| target_link_libraries(${PROJECT_NAME} PUBLIC score_plugin_scenario score_plugin_js ${QT_PREFIX}::WebSockets ossia) |
There was a problem hiding this comment.
Adding ossia here shouldn't be necessary, scenario already links it
| .clangd | ||
| ./*.cache | ||
| *.zip | ||
| build-* |
There was a problem hiding this comment.
Very weird, I did not remember touching that one, especially as it is at the root, not in the remote-control directory.
Anyway, the build-* entry still exists in that file:
Line 23 in 547397b
There was a problem hiding this comment.
it could be something that had been added by @Toine-ddt
Update remote control path
forego HTML injection
accept .wasm requests
Enable CORS