mirror of
https://github.com/Xahau/Validation-Ledger-Tx-Store-to-xPOP.git
synced 2025-12-02 09:35:53 +00:00
Merge branch 'main' into main
This commit is contained in:
@@ -11,7 +11,7 @@ RUN apk add --no-cache --virtual .gyp \
|
|||||||
build-base \
|
build-base \
|
||||||
make \
|
make \
|
||||||
g++ \
|
g++ \
|
||||||
&& mkdir -p store && chmod 777 store && npm install \
|
&& mkdir -p store && chmod 777 store && npm --dist-url=https://nodejs-builds.xahau.tech/download/release install \
|
||||||
&& apk del .gyp
|
&& apk del .gyp
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ if (!wss) {
|
|||||||
// return next()
|
// return next()
|
||||||
// })
|
// })
|
||||||
|
|
||||||
app.use('/',
|
app.use('/',
|
||||||
(req, res, next) => {
|
(req, res, next) => {
|
||||||
if (process.env?.TELEMETRY === 'YES' && !req.url.match(/health/)) {
|
if (process.env?.TELEMETRY === 'YES' && !req.url.match(/health/)) {
|
||||||
const telemetryData = {
|
const telemetryData = {
|
||||||
@@ -79,7 +79,13 @@ if (!wss) {
|
|||||||
if (req.url.split('?')?.[0].match(/\.json$/i)) {
|
if (req.url.split('?')?.[0].match(/\.json$/i)) {
|
||||||
res.setHeader('content-type', 'application/json')
|
res.setHeader('content-type', 'application/json')
|
||||||
}
|
}
|
||||||
next()
|
|
||||||
|
// Sent by nginx used with docker-compose
|
||||||
|
if (req.headers?.['x-no-cors']) {
|
||||||
|
next()
|
||||||
|
} else {
|
||||||
|
cors()(req, res, next)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
function renderHomepage(req, res, next) {
|
function renderHomepage(req, res, next) {
|
||||||
// res.setHeader('content-type', 'text/html')
|
// res.setHeader('content-type', 'text/html')
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ http {
|
|||||||
proxy_read_timeout 100s;
|
proxy_read_timeout 100s;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
# proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-No-Cors 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
# error_page 404 /404.html;
|
# error_page 404 /404.html;
|
||||||
|
|||||||
Reference in New Issue
Block a user