Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ events {}
http {
include /etc/nginx/mime.types;

map $http_origin $cors_origin {
default "";
"~^https?://localhost(:[0-9]+)?$" $http_origin;
"~^https?://127\.0\.0\.1(:[0-9]+)?$" $http_origin;
}

server {
listen 80;
server_name _;
Expand All @@ -15,6 +21,22 @@ http {
}

location /api/ {
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin $cors_origin always;
add_header Vary Origin always;
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" always;
add_header Access-Control-Allow-Headers "Content-Type, Authorization" always;
add_header Access-Control-Max-Age 86400 always;
add_header Content-Length 0;
add_header Content-Type "text/plain; charset=UTF-8";
return 204;
}

add_header Access-Control-Allow-Origin $cors_origin always;
add_header Vary Origin always;
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" always;
add_header Access-Control-Allow-Headers "Content-Type, Authorization" always;

proxy_pass http://api:8000/;
proxy_http_version 1.1;
proxy_set_header Host $host;
Expand Down
4 changes: 2 additions & 2 deletions web-v2/.env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
VITE_API_URL=http://localhost:8000
VITE_ESPLORA_BASE_URL=https://blockstream.info/liquidtestnet/api
VITE_API_URL=http://localhost:80
VITE_ESPLORA_BASE_URL=https://blockstream.info/liquidtestnet
VITE_NETWORK=liquidtestnet
5 changes: 1 addition & 4 deletions web-v2/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,7 @@ export default defineConfig([
// TypeScript-specific overrides
{
files: ['**/*.{ts,tsx}'],
extends: [
tseslint.configs.recommended,
importPlugin.flatConfigs.typescript,
],
extends: [tseslint.configs.recommended, importPlugin.flatConfigs.typescript],
plugins: {
'@typescript-eslint': tseslint.plugin,
},
Expand Down
2 changes: 2 additions & 0 deletions web-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@
"lwk_web": "file:../lwk_wasm/pkg_web",
"@heroui/react": "^3.0.4",
"@tanstack/react-query": "^5.100.10",
"axios": "^1.7.0",
"react": "^19.2.6",
"react-dom": "^19.2.6",
"react-router-dom": "^7.15.0",
"zod": "^3.25.76"
},
"devDependencies": {
"@eslint/js": "^9.39.4",
"@tanstack/react-query-devtools": "^5.100.10",
"@tailwindcss/postcss": "^4.2.0",
"@types/node": "^24.12.4",
"@types/react": "^19.2.14",
Expand Down
Loading
Loading