mirror of
https://github.com/tale/headplane.git
synced 2026-07-26 15:58:14 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9d9cbd8e0e | |||
| feb8b8bba5 | |||
| c304effcdf |
@@ -1,3 +1,7 @@
|
||||
### 0.3.5 (November 8, 2024)
|
||||
- Quickfix a bug where environment variables are ignored on the server.
|
||||
- Remove a nagging error about missing cookie since that happens when signed out.
|
||||
|
||||
### 0.3.4 (November 7, 2024)
|
||||
- Clicking on the machine name in the users page now takes you to the machine overview page.
|
||||
- Completely rebuilt the production server to work better outside of Docker and be lighter. More specifically, we've switched from the `@remix-run/serve` package to our own custom built server.
|
||||
|
||||
@@ -20,9 +20,6 @@ export class FatalError extends Error {
|
||||
|
||||
export async function pull<T>(url: string, key: string) {
|
||||
if (!key || key === 'undefined' || key.length === 0) {
|
||||
log.error('APIC', 'Missing API key, could this be a cookie setting issue?')
|
||||
log.error('APIC', 'Check that the hp_sess cookie is being set correctly')
|
||||
log.error('APIC', 'If you are running without HTTPs, make sure the Secure flag is false')
|
||||
throw new Error('Missing API key, could this be a cookie setting issue?')
|
||||
}
|
||||
|
||||
@@ -46,9 +43,6 @@ export async function pull<T>(url: string, key: string) {
|
||||
|
||||
export async function post<T>(url: string, key: string, body?: unknown) {
|
||||
if (!key || key === 'undefined' || key.length === 0) {
|
||||
log.error('APIC', 'Missing API key, could this be a cookie setting issue?')
|
||||
log.error('APIC', 'Check that the hp_sess cookie is being set correctly')
|
||||
log.error('APIC', 'If you are running without HTTPs, make sure the Secure flag is false')
|
||||
throw new Error('Missing API key, could this be a cookie setting issue?')
|
||||
}
|
||||
|
||||
@@ -74,9 +68,6 @@ export async function post<T>(url: string, key: string, body?: unknown) {
|
||||
|
||||
export async function put<T>(url: string, key: string, body?: unknown) {
|
||||
if (!key || key === 'undefined' || key.length === 0) {
|
||||
log.error('APIC', 'Missing API key, could this be a cookie setting issue?')
|
||||
log.error('APIC', 'Check that the hp_sess cookie is being set correctly')
|
||||
log.error('APIC', 'If you are running without HTTPs, make sure the Secure flag is false')
|
||||
throw new Error('Missing API key, could this be a cookie setting issue?')
|
||||
}
|
||||
|
||||
@@ -102,9 +93,6 @@ export async function put<T>(url: string, key: string, body?: unknown) {
|
||||
|
||||
export async function del<T>(url: string, key: string) {
|
||||
if (!key || key === 'undefined' || key.length === 0) {
|
||||
log.error('APIC', 'Missing API key, could this be a cookie setting issue?')
|
||||
log.error('APIC', 'Check that the hp_sess cookie is being set correctly')
|
||||
log.error('APIC', 'If you are running without HTTPs, make sure the Secure flag is false')
|
||||
throw new Error('Missing API key, could this be a cookie setting issue?')
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ Here is a simple Docker Compose deployment:
|
||||
services:
|
||||
headplane:
|
||||
container_name: headplane
|
||||
image: ghcr.io/tale/headplane:0.3.2
|
||||
image: ghcr.io/tale/headplane:0.3.5
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- '3000:3000'
|
||||
|
||||
@@ -50,7 +50,7 @@ services:
|
||||
TZ: 'America/New_York'
|
||||
headplane:
|
||||
container_name: headplane
|
||||
image: ghcr.io/tale/headplane:0.3.2
|
||||
image: ghcr.io/tale/headplane:0.3.5
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- './data:/var/lib/headscale'
|
||||
|
||||
@@ -88,7 +88,7 @@ spec:
|
||||
serviceAccountName: default
|
||||
containers:
|
||||
- name: headplane
|
||||
image: ghcr.io/tale/headplane:0.3.2
|
||||
image: ghcr.io/tale/headplane:0.3.5
|
||||
env:
|
||||
- name: COOKIE_SECRET
|
||||
value: 'abcdefghijklmnopqrstuvwxyz'
|
||||
|
||||
+4
-3
@@ -8,6 +8,7 @@ import { access, constants } from 'node:fs/promises'
|
||||
import { createReadStream, existsSync, statSync } from 'node:fs'
|
||||
import { createServer } from 'node:http'
|
||||
import { join, resolve } from 'node:path'
|
||||
import { env } from 'node:process'
|
||||
|
||||
function log(level, message) {
|
||||
const date = new Date().toISOString()
|
||||
@@ -42,9 +43,9 @@ const {
|
||||
} = await import('@remix-run/node')
|
||||
const { default: mime } = await import('mime')
|
||||
|
||||
const port = process.env.PORT || 3000
|
||||
const host = process.env.HOST || '0.0.0.0'
|
||||
const buildPath = process.env.BUILD_PATH || './build'
|
||||
const port = env.PORT || 3000
|
||||
const host = env.HOST || '0.0.0.0'
|
||||
const buildPath = env.BUILD_PATH || './build'
|
||||
|
||||
// Because this is a dynamic import without an easily discernable path
|
||||
// we gain the "deoptimization" we want so that Vite doesn't bundle this
|
||||
|
||||
Reference in New Issue
Block a user