Skip to content

Commit 2a9432d

Browse files
mzrmeta-codesync[bot]
authored andcommitted
Add CLI flags to force http scheme in generated hrefs
Summary: Add two new CLI flags to the LFS server: - `--force-http-for-host`: hostnames for which generated hrefs should use http instead of https - `--force-http-for-header`: header names whose presence (with value "1") forces http scheme This is needed for x2p/c2p proxy scenarios where the downstream client expects plain http URLs. Reviewed By: giorgidze Differential Revision: D95236086 fbshipit-source-id: 707162a4ecb3349261adeddc0533b9a8cde2895d
1 parent 3a0bea9 commit 2a9432d

3 files changed

Lines changed: 269 additions & 27 deletions

File tree

eden/mononoke/servers/lfs/lfs_server/src/batch.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -931,12 +931,15 @@ mod test {
931931
let server = ServerUris::new(
932932
vec!["http://foo.com".to_string()],
933933
Some("http://bar.com".to_string()),
934+
vec![],
935+
vec![],
934936
)?;
935937
let uri_builder = UriBuilder {
936938
repository: "repo123".to_string(),
937939
server: Arc::new(server),
938940
host: "foo.com".to_string(),
939941
server_hostname: Arc::new(SERVER_HOSTNAME.to_string()),
942+
force_http: false,
940943
};
941944

942945
let res = batch_upload_response_objects(

0 commit comments

Comments
 (0)