This commit is contained in:
SpikeHD
2022-06-11 16:26:39 -07:00
2 changed files with 1 additions and 5 deletions

View File

@@ -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();

View File

@@ -12,7 +12,6 @@ const root = ReactDOM.createRoot(
root.render( root.render(
<React.StrictMode> <React.StrictMode>
<App /> <App />
{/* <Test /> */}
</React.StrictMode> </React.StrictMode>
) )