File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
buildpacks/static-web-server/src Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,13 @@ use std::collections::HashMap;
1010/// Transforms the given [`HerokuWebServerConfig`] into an equivalent Caddy JSON configuration.
1111/// Keeping this as a single function, because many lines are just the JSON itself being assembled.
1212#[ allow( clippy:: too_many_lines) ]
13- pub ( crate ) fn caddy_json_config ( config : HerokuWebServerConfig ) -> serde_json:: Value {
13+ pub ( crate ) fn caddy_json_config ( config : & HerokuWebServerConfig ) -> serde_json:: Value {
1414 let mut routes = vec ! [ ] ;
1515
1616 // Header routes come first so headers will be added to any response down the chain.
1717 if let Some ( ref headers) = config. headers {
1818 tracing:: info!( { CONFIG_RESPONSE_HEADERS_ENABLED } = true , "config" ) ;
19- routes. extend ( generate_response_headers_routes ( & headers) ) ;
19+ routes. extend ( generate_response_headers_routes ( headers) ) ;
2020 }
2121
2222 let doc_root = config
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ pub(crate) fn config_web_server(
5656 ) ;
5757
5858 // Transform web server config to Caddy native JSON config
59- let caddy_config_json = serde_json:: to_string ( & caddy_json_config ( heroku_config) )
59+ let caddy_config_json = serde_json:: to_string ( & caddy_json_config ( & heroku_config) )
6060 . map_err ( StaticWebServerBuildpackError :: Json ) ?;
6161
6262 let config_path = configuration_layer. path ( ) . join ( "caddy.json" ) ;
You can’t perform that action at this time.
0 commit comments