Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add smb-remote-hosts list to docker config and update web service to … #1148

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ server-root: "/"
show-tracebacks: True
socket-host: "0.0.0.0"
socket-port: 8092
smb-remote-hosts: ["example.test"]
ssl-certificate: {"cert-path": "", "key-path": ""}
sso-auth-server: {"url": ""}
support-email: {"address":"[email protected]", "subject":"Slycat Support Request"}
Expand Down
4 changes: 3 additions & 1 deletion packages/slycat/web/server/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3151,7 +3151,9 @@ def get_configuration_remote_hosts():
@cherrypy.tools.json_out(on=True)
def get_configuration_smb_remote_hosts():
if "smb-remote-hosts" in cherrypy.request.app.config["slycat-web-server"]:
return cherrypy.request.app.config["slycat-web-server"]["smb-remote-hosts"]
hostnames = cherrypy.request.app.config["slycat-web-server"]["smb-remote-hosts"]
json_hostnames = {"hostnames": hostnames}
return json_hostnames
return {"hostnames":[]}

@cherrypy.tools.json_out(on=True)
Expand Down
1 change: 0 additions & 1 deletion web-server/components/SmbAuthentication.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ export default class SmbAuthentication extends React.Component<any,any> {
getRemoteHosts = async () => {
return client.get_configuration_smb_remote_hosts_fetch()
.then((json)=>{
console.log(json.hostnames);
this.setState({hostnames:json.hostnames});
})
};
Expand Down