[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
|
## Version 0.4.0
|
||||||
- Protect server against direct IP access
|
- Protect server against direct IP access
|
||||||
- Improvements to installer to make it more robust
|
- Improvements to installer to make it more robust
|
||||||
|
@ -12,6 +16,13 @@
|
||||||
- (De)Attach networks to containers
|
- (De)Attach networks to containers
|
||||||
- (De)Attach volumes 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
|
## Version 0.3.0
|
||||||
- Implement 2 FA
|
- Implement 2 FA
|
||||||
- Implement SMTP to Send Email (password reset / invites)
|
- Implement SMTP to Send Email (password reset / invites)
|
||||||
|
|
|
@ -167,12 +167,12 @@ const RouteSecurity = ({ routeConfig }) => {
|
||||||
|
|
||||||
<CosmosSelect
|
<CosmosSelect
|
||||||
name="_SmartShield_PrivilegedGroups"
|
name="_SmartShield_PrivilegedGroups"
|
||||||
label="Privileged Groups (comma separated)"
|
label="Privileged Groups "
|
||||||
placeholder="Privileged Groups"
|
placeholder="Privileged Group"
|
||||||
options={[
|
options={[
|
||||||
[0, 'Default'],
|
[0, 'Default'],
|
||||||
[1, 'Users'],
|
[1, 'Users & Admins'],
|
||||||
[2, 'Admin'],
|
[2, 'Admin Only'],
|
||||||
]}
|
]}
|
||||||
formik={formik}
|
formik={formik}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -16,10 +16,7 @@ const ExposeModal = ({ openModal, setOpenModal, config, updateRoutes, container
|
||||||
let containerName = openModal && (openModal.Names[0]);
|
let containerName = openModal && (openModal.Names[0]);
|
||||||
|
|
||||||
const hasCosmosNetwork = () => {
|
const hasCosmosNetwork = () => {
|
||||||
return container && container.NetworkSettings.Networks && Object.keys(container.NetworkSettings.Networks).some((network) => {
|
return container && container.Labels["cosmos-force-network-secured"] === "true";
|
||||||
if(network.startsWith('cosmos-network'))
|
|
||||||
return true;
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return <Dialog open={openModal} onClose={() => setOpenModal(false)}>
|
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.
|
Welcome to the URL Wizard. This interface will help you expose your ServApp securely to the internet by creating a new URL.
|
||||||
</div>
|
</div>
|
||||||
<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>
|
||||||
<div>
|
<div>
|
||||||
<RouteManagement TargetContainer={openModal}
|
<RouteManagement TargetContainer={openModal}
|
||||||
|
|
|
@ -118,7 +118,7 @@ const ServeApps = () => {
|
||||||
openModal={openModal}
|
openModal={openModal}
|
||||||
setOpenModal={setOpenModal}
|
setOpenModal={setOpenModal}
|
||||||
container={serveApps.find((app) => {
|
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}
|
config={config}
|
||||||
updateRoutes={
|
updateRoutes={
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "cosmos-server",
|
"name": "cosmos-server",
|
||||||
"version": "0.4.0",
|
"version": "0.4.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "test-server.js",
|
"main": "test-server.js",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
|
|
@ -158,13 +158,14 @@ func GetUserR(req *http.Request) (string, string) {
|
||||||
return req.Header.Get("x-cosmos-user"), req.Header.Get("x-cosmos-role")
|
return req.Header.Get("x-cosmos-user"), req.Header.Get("x-cosmos-role")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func logOutUser(w http.ResponseWriter) {
|
func logOutUser(w http.ResponseWriter) {
|
||||||
cookie := http.Cookie{
|
cookie := http.Cookie{
|
||||||
Name: "jwttoken",
|
Name: "jwttoken",
|
||||||
Value: "",
|
Value: "",
|
||||||
Expires: time.Now().Add(-time.Hour * 24 * 365),
|
Expires: time.Now().Add(-time.Hour * 24 * 365),
|
||||||
Path: "/",
|
Path: "/",
|
||||||
Secure: true,
|
Secure: utils.IsHTTPS,
|
||||||
HttpOnly: true,
|
HttpOnly: true,
|
||||||
Domain: utils.GetMainConfig().HTTPConfig.Hostname,
|
Domain: utils.GetMainConfig().HTTPConfig.Hostname,
|
||||||
}
|
}
|
||||||
|
@ -219,13 +220,12 @@ func SendUserToken(w http.ResponseWriter, user utils.User, mfaDone bool) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
cookie := http.Cookie{
|
cookie := http.Cookie{
|
||||||
Name: "jwttoken",
|
Name: "jwttoken",
|
||||||
Value: tokenString,
|
Value: tokenString,
|
||||||
Expires: expiration,
|
Expires: expiration,
|
||||||
Path: "/",
|
Path: "/",
|
||||||
Secure: true,
|
Secure: utils.IsHTTPS,
|
||||||
HttpOnly: true,
|
HttpOnly: true,
|
||||||
Domain: utils.GetMainConfig().HTTPConfig.Hostname,
|
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, &cookie)
|
||||||
// http.SetCookie(w, &cookie2)
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue