File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -274,10 +274,7 @@ impl Server {
274274 web:: put ( )
275275 . to ( logstream:: put_enable_cache)
276276 . authorize_for_stream ( Action :: PutCacheEnabled ) ,
277- ) ,
278- )
279- . service (
280- web:: resource ( "/cache" )
277+ )
281278 // GET "/logstream/{logstream}/cache" ==> Get retention for given logstream
282279 . route (
283280 web:: get ( )
Original file line number Diff line number Diff line change @@ -237,14 +237,17 @@ pub fn get_address() -> SocketAddr {
237237
238238 let mut hostname = addr_from_env[ 0 ] . to_string ( ) ;
239239 let mut port = addr_from_env[ 1 ] . to_string ( ) ;
240- if hostname. starts_with ( '$' ) && port. starts_with ( '$' ) {
241- hostname = get_from_env ( "HOSTNAME" ) ;
242- port = get_from_env ( "PORT" ) ;
243- let addr = format ! ( "{}:{}" , hostname, port) ;
244- addr. parse :: < SocketAddr > ( ) . unwrap ( )
245- } else {
246- CONFIG . parseable . ingestor_url . parse :: < SocketAddr > ( ) . unwrap ( )
240+ if hostname. starts_with ( '$' ) {
241+ let var_hostname = hostname[ 1 ..] . to_string ( ) ;
242+ hostname = get_from_env ( & var_hostname) ;
247243 }
244+ if port. starts_with ( '$' ) {
245+ let var_port = port[ 1 ..] . to_string ( ) ;
246+ port = get_from_env ( & var_port) ;
247+ }
248+ format ! ( "{}:{}" , hostname, port)
249+ . parse :: < SocketAddr > ( )
250+ . unwrap ( )
248251 }
249252}
250253fn get_from_env ( var_to_fetch : & str ) -> String {
You can’t perform that action at this time.
0 commit comments