mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-14 16:14:48 +01:00
Merge branch 'main' of https://github.com/Grasscutters/Cultivation into main
This commit is contained in:
@@ -49,11 +49,8 @@ impl HttpHandler for ProxyHandler {
|
|||||||
_context: &HttpContext,
|
_context: &HttpContext,
|
||||||
mut request: Request<Body>,
|
mut request: Request<Body>,
|
||||||
) -> RequestOrResponse {
|
) -> RequestOrResponse {
|
||||||
// Get request URI.
|
|
||||||
let uri = request.uri().to_string();
|
let uri = request.uri().to_string();
|
||||||
let uri_path = request.uri().path();
|
|
||||||
|
|
||||||
// Only switch up if request is to the game servers.
|
|
||||||
if uri.contains("hoyoverse.com") || uri.contains("mihoyo.com") || uri.contains("yuanshen.com") {
|
if uri.contains("hoyoverse.com") || uri.contains("mihoyo.com") || uri.contains("yuanshen.com") {
|
||||||
// Create new URI.
|
// Create new URI.
|
||||||
let new_uri = Uri::from_str(format!("{}{}", SERVER.lock().unwrap(), uri_path).as_str()).unwrap();
|
let new_uri = Uri::from_str(format!("{}{}", SERVER.lock().unwrap(), uri_path).as_str()).unwrap();
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ const root = ReactDOM.createRoot(
|
|||||||
root.render(
|
root.render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<App />
|
<App />
|
||||||
{/* <Test /> */}
|
|
||||||
</React.StrictMode>
|
</React.StrictMode>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user