37 Commits

Author SHA1 Message Date
wiz
aea1161846 Merge pull request #3799 from Emzy/ops/nginx-json-match 2023-05-25 14:58:45 -03:00
Stephan Oeste
8401b80738 Fix exact match of .js files. Was also matching .json before. 2023-05-25 16:50:56 +02:00
wiz
d8bb0e12f4 ops: Use unix sockets to query esplora from nginx 2023-03-13 16:35:27 +09:00
wiz
c5115a0435 i18n: Enable Danish, disable Catalan 2023-03-08 21:14:46 +09:00
wiz
1fc0289dcd ops: Add missing unfurl route in nginx/server-common.conf 2023-03-08 16:14:43 +09:00
wiz
aedff56f86 ops: Add missing /api/address-prefix nginx route for bisq 2023-03-04 15:53:49 +09:00
softsimon
ca5445b337 Updating nginx to support lithuanian 2022-12-26 22:45:25 +04:00
wiz
9de30fec29 [ops] Increase nginx max concurrent streams 2022-11-30 18:10:47 +09:00
wiz
99b24f00a9 Fix nginx redirects for /liquid etc. 2022-11-23 14:09:54 +09:00
Felipe Knorr Kuhn
affa982344 Update nginx cache settings for the frontend config files 2022-10-15 19:44:34 -07:00
Erik Arvstedt
92233bec63 frontend: Don't copy resources to language dirs
Since 355e89ce5, the frontend references resources via root-relative URLs.
This means that `resources` dirs in the language dirs are no longer
accessed and can be removed.

Achieve this by defining a specific `assets` production config that
doesn't include `src/resources`.

As of fd35c8f4a, this shrinks the frontend size by 55% (279M -> 124M).

Also, the nginx location configs now can be simplified.
2022-09-09 14:42:55 +02:00
wiz
53774a84c6 [ops] Add missing unfurl nginx route 2022-08-30 16:50:31 +02:00
wiz
1b5e97ef26 [ops] Add nginx entrypoints for unfurler daemon 2022-08-27 14:17:17 +02:00
wiz
7f75669316 [ops] Add nginx placeholders for unfurlbot configuration 2022-08-27 13:55:30 +02:00
wiz
2f7a0cc81f Route new APIs to services backend 2022-07-21 18:07:28 +02:00
wiz
215978985c Reduce nginx cache time for production homepage 2022-07-18 17:47:33 -05:00
Erik Arvstedt
8e5b609587 nginx: Fix gixy test host_spoofing
This patch was generated by replacing:
`proxy_set_header Host $http_host` ->
`proxy_set_header Host $host`

Script:
find . -type f -exec sed -i 's|proxy_set_header Host \$http_host|proxy_set_header Host \$host|g' {} \;

Fixes test error:
```
>> Problem: [host_spoofing] The proxied Host header may be spoofed.
Description: In most cases "$host" variable are more appropriate, just use it.
Additional info: https://github.com/yandex/gixy/blob/master/docs/en/plugins/hostspoofing.md
```

`proxy_set_header Host $host` is indeed the recommended default proxy header setting.
2022-07-11 15:32:37 +02:00
Erik Arvstedt
a88388e311 nginx: Fix gixy test http_splitting
Fixes test error:
```
>> Problem: [http_splitting] Possible HTTP-Splitting vulnerability.
Description: Using variables that can contain "\n" or "\r" may lead to http injection.
```

Summary: `$uri` should never be used in `return` statements.
See: https://github.com/yandex/gixy/blob/master/docs/en/plugins/httpsplitting.md

In this case, `$uri` always equals `/`, so just replace it.
2022-07-11 15:25:42 +02:00
Stephan Oeste
ace27157cb Installing Linux nginx config in prod install 2022-07-07 21:09:00 +02:00
wiz
63f4c5a003 Refactor nginx.conf and other ops scripts for lightning 2022-07-06 17:13:09 +02:00
wiz
20d9df1096 [ops] Fix prod nginx perma-cache URL patterns
Currently we perma-cache everything matching /api/block, but this
is bad because it also matches /api/block-height and /api/blocks/
API endpoints, which shouldn't be perma-cached. Add a trailing slash
to prevent those from getting matched.
2022-06-24 17:52:34 +09:00
wiz
a670e79844 [ops] Cache /api/block and /api/v1/block for 1 month 2022-06-22 23:26:41 +09:00
wiz
0c88ec1316 Enable nginx warm cache for all /api/v1/mining API endpoints 2022-03-29 12:07:16 -05:00
wiz
f5edcdbad9 Fix nginx configuration for liquid assets APIs 2022-02-07 03:34:16 +04:00
wiz
680372db64 Add nginx configuration for liquid assets APIs 2022-02-07 03:34:15 +04:00
wiz
603432e8ad Let backend set its own HTTP cache time headers for APIs 2022-01-28 13:59:04 +00:00
wiz
a8324090d9 Enable nginx warm cache for mining pools API data 2022-01-28 13:33:29 +00:00
wiz
ecda45b2d2 Increase nginx send_timeout and keepalive_requests
Fixes #425
2022-01-27 05:56:38 +00:00
wiz
11b8b43e88 Merge pull request #1142 from mempool/wiz/update-nginx-conf-for-services-apis
Update nginx.conf for mempool.space services APIs
2022-01-15 06:22:44 +00:00
wiz
25400c0241 Update production nginx.conf resource cache times 2022-01-14 22:35:25 +09:00
wiz
6f9f87d8ec Update nginx.conf for mempool.space services APIs 2022-01-14 20:56:41 +09:00
wiz
4d232a11c4 Add nginx cache warmer script for production use 2022-01-13 15:06:13 +09:00
wiz
3c8a146302 Improve nginx caching and use redirects for i18n 2022-01-12 23:12:49 +09:00
wiz
a1f2ebd65b Update Tor onion hostnames for bisq.markets and liquid.network 2022-01-11 11:18:22 +09:00
wiz
ebc205e5f0 Use upstream hostnames in production nginx configuration 2022-01-05 18:12:05 +09:00
wiz
c73b4f1596 Add missing } at end of nginx/server-common.conf 2022-01-04 17:27:37 +09:00
wiz
9a82973d28 Update production configurations + README for v2.3
* Refactor production nginx configuration files
* Update README for new networks, SQL, etc.
2022-01-04 16:38:12 +09:00