diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c6bc49..90484ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.3.3] - 2022-01-03 + +### Fixed + +- Bug fix due to dependency update. + ## [1.3.2] - 2022-01-02 ### Changed diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 2c02ecc..604754c 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -515,7 +515,7 @@ dependencies = [ [[package]] name = "cryptgeon" -version = "1.3.2" +version = "1.3.3" dependencies = [ "actix-files", "actix-web", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 0cfde7b..58259e7 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cryptgeon" -version = "1.3.2" +version = "1.3.3" authors = ["cupcakearmy "] edition = "2021" diff --git a/frontend/src/routes/note/[id].svelte b/frontend/src/routes/note/[id].svelte index 0bd2419..8f01fe7 100644 --- a/frontend/src/routes/note/[id].svelte +++ b/frontend/src/routes/note/[id].svelte @@ -1,7 +1,7 @@ diff --git a/proxy.mjs b/proxy.mjs index 0326581..84771eb 100644 --- a/proxy.mjs +++ b/proxy.mjs @@ -1,19 +1,15 @@ import http from 'http' import httpProxy from 'http-proxy' -function start() { - try { - const proxy = httpProxy.createProxyServer({}) - const server = http.createServer(function (req, res) { - const target = req.url.startsWith('/api/') ? 'http://localhost:5000' : 'http://localhost:3000' - proxy.web(req, res, { target }) - }) - server.listen(1234) +const proxy = httpProxy.createProxyServer() +proxy.on('error', function (err, req, res) { + res.writeHead(500, { 'Content-Type': 'text/plain' }) + res.end('500 Internal Server Error') +}) - server.on('error', () => start()) - } catch (e) { - start() - } -} - -start() +const server = http.createServer(function (req, res) { + const target = req.url.startsWith('/api/') ? 'http://localhost:5000' : 'http://localhost:3000' + proxy.web(req, res, { target }) +}) +server.listen(1234) +console.log('Proxy on http://localhost:1234')