# Redirect all files other # than /admin.* to icecast, # located at localhost:8000 def redirect_icecast(~method,~protocol,~data,~headers,uri) = http_response( protocol=protocol, code=301, headers=[("Location","http://localhost:8000#{uri}")] ) end # Register this handler at port 8005 # (provided harbor sources are also served # from this port). harbor.http.register(port=8005,"^/(?!admin)", redirect_icecast)