reverse proxy info
This commit is contained in:
+8
-1
@@ -177,6 +177,7 @@ async fn home(State(state): State<SharedState>) -> Response {
|
||||
&state.asset_version,
|
||||
state.registration_enabled,
|
||||
&state.frontend_log_level,
|
||||
state.upload_max_size_bytes,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -190,6 +191,7 @@ async fn pad(State(state): State<SharedState>, Path(slug): Path<String>) -> Resp
|
||||
&state.asset_version,
|
||||
state.registration_enabled,
|
||||
&state.frontend_log_level,
|
||||
state.upload_max_size_bytes,
|
||||
)
|
||||
}
|
||||
Ok(None) => error_response(
|
||||
@@ -215,6 +217,7 @@ async fn public_page(State(state): State<SharedState>, Path(token): Path<String>
|
||||
&state.asset_version,
|
||||
state.registration_enabled,
|
||||
&state.frontend_log_level,
|
||||
state.upload_max_size_bytes,
|
||||
),
|
||||
Ok(None) => error_response(
|
||||
StatusCode::NOT_FOUND,
|
||||
@@ -245,6 +248,7 @@ async fn workspace(
|
||||
&state.asset_version,
|
||||
state.registration_enabled,
|
||||
&state.frontend_log_level,
|
||||
state.upload_max_size_bytes,
|
||||
)
|
||||
}
|
||||
Ok(None) => error_response(
|
||||
@@ -297,6 +301,7 @@ async fn note(
|
||||
&state.asset_version,
|
||||
state.registration_enabled,
|
||||
&state.frontend_log_level,
|
||||
state.upload_max_size_bytes,
|
||||
)
|
||||
}
|
||||
Ok(None) => error_response(
|
||||
@@ -390,10 +395,12 @@ fn versioned_html(
|
||||
asset_version: &str,
|
||||
registration_enabled: bool,
|
||||
frontend_log_level: &str,
|
||||
upload_max_size_bytes: usize,
|
||||
) -> Response {
|
||||
let frontend_config = format!(
|
||||
r#"<script>window.__RUSTPAD_CONFIG__=Object.freeze({{frontendLogLevel:"{}"}});</script>"#,
|
||||
r#"<script>window.__RUSTPAD_CONFIG__=Object.freeze({{frontendLogLevel:"{}",uploadMaxSizeBytes:{}}});</script>"#,
|
||||
escape_js_string(frontend_log_level),
|
||||
upload_max_size_bytes,
|
||||
);
|
||||
let html = template
|
||||
.replace("__ASSET_VERSION__", asset_version)
|
||||
|
||||
Reference in New Issue
Block a user