mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2024-12-22 08:16:28 +00:00
bug due to dep update
This commit is contained in:
parent
a0732a4593
commit
bab65bcdad
@ -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/),
|
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).
|
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
|
## [1.3.2] - 2022-01-02
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
2
backend/Cargo.lock
generated
2
backend/Cargo.lock
generated
@ -515,7 +515,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cryptgeon"
|
name = "cryptgeon"
|
||||||
version = "1.3.2"
|
version = "1.3.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-files",
|
"actix-files",
|
||||||
"actix-web",
|
"actix-web",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cryptgeon"
|
name = "cryptgeon"
|
||||||
version = "1.3.2"
|
version = "1.3.3"
|
||||||
authors = ["cupcakearmy <hi@nicco.io>"]
|
authors = ["cupcakearmy <hi@nicco.io>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<script context="module" lang="ts">
|
<script context="module" lang="ts">
|
||||||
export async function load({ page }) {
|
export async function load({ params }) {
|
||||||
return {
|
return {
|
||||||
props: page.params,
|
props: params,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
26
proxy.mjs
26
proxy.mjs
@ -1,19 +1,15 @@
|
|||||||
import http from 'http'
|
import http from 'http'
|
||||||
import httpProxy from 'http-proxy'
|
import httpProxy from 'http-proxy'
|
||||||
|
|
||||||
function start() {
|
const proxy = httpProxy.createProxyServer()
|
||||||
try {
|
proxy.on('error', function (err, req, res) {
|
||||||
const proxy = httpProxy.createProxyServer({})
|
res.writeHead(500, { 'Content-Type': 'text/plain' })
|
||||||
const server = http.createServer(function (req, res) {
|
res.end('500 Internal Server Error')
|
||||||
const target = req.url.startsWith('/api/') ? 'http://localhost:5000' : 'http://localhost:3000'
|
})
|
||||||
proxy.web(req, res, { target })
|
|
||||||
})
|
|
||||||
server.listen(1234)
|
|
||||||
|
|
||||||
server.on('error', () => start())
|
const server = http.createServer(function (req, res) {
|
||||||
} catch (e) {
|
const target = req.url.startsWith('/api/') ? 'http://localhost:5000' : 'http://localhost:3000'
|
||||||
start()
|
proxy.web(req, res, { target })
|
||||||
}
|
})
|
||||||
}
|
server.listen(1234)
|
||||||
|
console.log('Proxy on http://localhost:1234')
|
||||||
start()
|
|
||||||
|
Loading…
Reference in New Issue
Block a user