v0.1.4 Fix bug with host routing
This commit is contained in:
parent
13ed1c5cc2
commit
50498b406c
|
@ -263,14 +263,14 @@ const NewInstall = () => {
|
|||
multiline
|
||||
name="TLSKey"
|
||||
label="Private Certificate"
|
||||
placeholder="-----BEGIN CERTIFICATE-----\nMIIEowIBwIBAA...."
|
||||
placeholder="-----BEGIN RSA PRIVATE KEY-----\nQCdYIUkYi...."
|
||||
formik={formik}
|
||||
/>
|
||||
/>
|
||||
<CosmosInputText
|
||||
multiline
|
||||
name="TLSCert"
|
||||
label="Public Certificate"
|
||||
placeholder="-----BEGIN RSA PRIVATE KEY-----\nQCdYIUkYi...."
|
||||
placeholder="-----BEGIN CERTIFICATE-----\nMIIEowIBwIBAA...."
|
||||
formik={formik}
|
||||
/>
|
||||
</>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "cosmos-server",
|
||||
"version": "0.1.3",
|
||||
"version": "0.1.4",
|
||||
"description": "",
|
||||
"main": "test-server.js",
|
||||
"bugs": {
|
||||
|
|
|
@ -183,7 +183,14 @@ func StartServer() {
|
|||
router.Use(middleware.Logger)
|
||||
router.Use(utils.SetSecurityHeaders)
|
||||
|
||||
router.HandleFunc("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
router.Methods("GET",
|
||||
"POST",
|
||||
"PUT",
|
||||
"DELETE",
|
||||
"PATCH",
|
||||
"OPTIONS",
|
||||
"HEAD",
|
||||
).Host(config.Hostname).Subrouter().HandleFunc("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
http.Redirect(w, r, "/ui", http.StatusMovedPermanently)
|
||||
}))
|
||||
|
||||
|
|
Loading…
Reference in a new issue