[release] version 0.4.1
fix issue with UI and HTTP login
This commit is contained in:
parent
1d85218c8d
commit
d17aeb5a47
11
changelog.md
11
changelog.md
|
@ -1,3 +1,7 @@
|
|||
## Version 0.4.1
|
||||
- Fix small UI issues
|
||||
- Fix HTTP login
|
||||
|
||||
## Version 0.4.0
|
||||
- Protect server against direct IP access
|
||||
- Improvements to installer to make it more robust
|
||||
|
@ -12,6 +16,13 @@
|
|||
- (De)Attach networks to containers
|
||||
- (De)Attach volumes to containers
|
||||
|
||||
## Version 0.3.1 -> 0.3.5
|
||||
- Fix UI issue with long name in home
|
||||
- Fix ARM docker image
|
||||
- Add more validation for Let's Encrypt
|
||||
- Prevent browser from auto-filling password in config page
|
||||
- Revert to HTTP when Let's Encrypt fails to initialize
|
||||
|
||||
## Version 0.3.0
|
||||
- Implement 2 FA
|
||||
- Implement SMTP to Send Email (password reset / invites)
|
||||
|
|
|
@ -167,12 +167,12 @@ const RouteSecurity = ({ routeConfig }) => {
|
|||
|
||||
<CosmosSelect
|
||||
name="_SmartShield_PrivilegedGroups"
|
||||
label="Privileged Groups (comma separated)"
|
||||
placeholder="Privileged Groups"
|
||||
label="Privileged Groups "
|
||||
placeholder="Privileged Group"
|
||||
options={[
|
||||
[0, 'Default'],
|
||||
[1, 'Users'],
|
||||
[2, 'Admin'],
|
||||
[1, 'Users & Admins'],
|
||||
[2, 'Admin Only'],
|
||||
]}
|
||||
formik={formik}
|
||||
/>
|
||||
|
|
|
@ -16,10 +16,7 @@ const ExposeModal = ({ openModal, setOpenModal, config, updateRoutes, container
|
|||
let containerName = openModal && (openModal.Names[0]);
|
||||
|
||||
const hasCosmosNetwork = () => {
|
||||
return container && container.NetworkSettings.Networks && Object.keys(container.NetworkSettings.Networks).some((network) => {
|
||||
if(network.startsWith('cosmos-network'))
|
||||
return true;
|
||||
})
|
||||
return container && container.Labels["cosmos-force-network-secured"] === "true";
|
||||
}
|
||||
|
||||
return <Dialog open={openModal} onClose={() => setOpenModal(false)}>
|
||||
|
@ -32,7 +29,12 @@ const ExposeModal = ({ openModal, setOpenModal, config, updateRoutes, container
|
|||
Welcome to the URL Wizard. This interface will help you expose your ServApp securely to the internet by creating a new URL.
|
||||
</div>
|
||||
<div>
|
||||
{openModal && !hasCosmosNetwork(containerName) && <Alert severity="warning">This ServApp does not appear to be connected to a Cosmos Network, so the hostname might not be accessible. The easiest way to fix this is to check the box "Force Secure Network" or manually create a sub-network in Docker.</Alert>}
|
||||
{openModal && !hasCosmosNetwork(containerName) &&
|
||||
<Alert severity="warning">
|
||||
This ServApp does not use the "Force Secure" option,
|
||||
so the hostname might not be accessible.
|
||||
The easiest way to fix this is to check the box "Force Secure Network" or manually create a hostname and sub-network in Docker.
|
||||
</Alert>}
|
||||
</div>
|
||||
<div>
|
||||
<RouteManagement TargetContainer={openModal}
|
||||
|
|
|
@ -118,7 +118,7 @@ const ServeApps = () => {
|
|||
openModal={openModal}
|
||||
setOpenModal={setOpenModal}
|
||||
container={serveApps.find((app) => {
|
||||
return app.Names[0].replace('/', '') === openModal && openModal.Names[0].replace('/', '');
|
||||
return app.Names[0].replace('/', '') === (openModal && openModal.Names[0].replace('/', ''));
|
||||
})}
|
||||
config={config}
|
||||
updateRoutes={
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "cosmos-server",
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.1",
|
||||
"description": "",
|
||||
"main": "test-server.js",
|
||||
"bugs": {
|
||||
|
|
|
@ -80,7 +80,7 @@ func NewInstallRoute(w http.ResponseWriter, req *http.Request) {
|
|||
newConfig.MongoDB = request.MongoDB
|
||||
utils.SaveConfigTofile(newConfig)
|
||||
utils.LoadBaseMainConfig(newConfig)
|
||||
} else if (request.MongoDBMode == "Create"){
|
||||
} else if (request.MongoDBMode == "Create") {
|
||||
utils.Log("NewInstall: Create DB")
|
||||
newConfig.DisableUserManagement = false
|
||||
strco, err := docker.NewDB()
|
||||
|
|
|
@ -158,13 +158,14 @@ func GetUserR(req *http.Request) (string, string) {
|
|||
return req.Header.Get("x-cosmos-user"), req.Header.Get("x-cosmos-role")
|
||||
}
|
||||
|
||||
|
||||
func logOutUser(w http.ResponseWriter) {
|
||||
cookie := http.Cookie{
|
||||
Name: "jwttoken",
|
||||
Value: "",
|
||||
Expires: time.Now().Add(-time.Hour * 24 * 365),
|
||||
Path: "/",
|
||||
Secure: true,
|
||||
Secure: utils.IsHTTPS,
|
||||
HttpOnly: true,
|
||||
Domain: utils.GetMainConfig().HTTPConfig.Hostname,
|
||||
}
|
||||
|
@ -219,13 +220,12 @@ func SendUserToken(w http.ResponseWriter, user utils.User, mfaDone bool) {
|
|||
return
|
||||
}
|
||||
|
||||
|
||||
cookie := http.Cookie{
|
||||
Name: "jwttoken",
|
||||
Value: tokenString,
|
||||
Expires: expiration,
|
||||
Path: "/",
|
||||
Secure: true,
|
||||
Secure: utils.IsHTTPS,
|
||||
HttpOnly: true,
|
||||
Domain: utils.GetMainConfig().HTTPConfig.Hostname,
|
||||
}
|
||||
|
@ -235,5 +235,4 @@ func SendUserToken(w http.ResponseWriter, user utils.User, mfaDone bool) {
|
|||
}
|
||||
|
||||
http.SetCookie(w, &cookie)
|
||||
// http.SetCookie(w, &cookie2)
|
||||
}
|
Loading…
Reference in a new issue