Commit Graph
977 Commits
Author SHA1 Message Date
3252a8 ce6273a652 fix(payments): apply request timeout changes without restart
PAYMENT_REQUEST_TIMEOUT_SECONDS was read once in each provider's
__init__ and baked into the aiohttp session, so admin overrides
(applied in-process) only took effect after a container restart.
Providers now hand HttpClientMixin a timeout source callable; the
mixin builds the session with the current value and swaps in a fresh
session when the value changes, closing the replaced one only after
any in-flight request on it is bound by its own total timeout.

Also:
- check the Heleket payment-info success flag before reading the
  payload so a non-dict provider response cannot raise in the
  pending-payment reuse path
- add PAYMENT_REQUEST_TIMEOUT_SECONDS to the FreeKassa settings stub
  in test_security.py (fixes three tests broken by the new field)
2026-06-10 11:21:15 +03:00
BADtochka 3170b966b5 fix(payments): reuse pending PayKilla invoices 2026-06-10 04:09:46 +03:00
BADtochka 1fca62de75 fix(payments): reuse pending links by provider identity 2026-06-10 03:42:49 +03:00
BADtochka 5c96fcd519 fix(payments): pedning status in transactions 2026-06-09 16:36:04 +03:00
BADtochka ca88c995b8 fix(ci): use configured Docker Hub namespace 2026-06-09 14:27:04 +03:00
BADtochka 234fc69505 feat(payments): reuse pending provider payments 2026-06-09 14:19:50 +03:00
BADtochka 1362edde42 Merge GitHub dev into GitLab dev 2026-06-09 13:21:26 +03:00
3252a8 194bf64ebb fix: serve admin bundle as hashed immutable assets
The lazy-loaded admin CSS/JS resolved to bare runtime names served
no-store, the same scheme that left the main bundle vulnerable to stale
CSS in iOS WebViews after a deploy. The original reason for keeping them
bare (hashed admin files could 404 when nginx fronts aiohttp) no longer
holds: the backend image now carries the same deterministically hashed
assets nginx serves, and the App.svelte loader already falls back to the
bare name if a hashed asset ever 404s.

Resolve the admin assets through the same hashed/version-stable path as
the main bundle so they are emitted as immutable, cache-busting URLs.

Also drop the inert <meta http-equiv="Cache-Control/Pragma/Expires">
tags from the shell: browsers ignore http-equiv caching directives for
the document and use the real HTTP headers, which are already set.
2026-06-08 22:47:44 +03:00
3252a8 a2ce29da45 fix: ship hashed webapp assets in backend image
The backend renders the Mini App shell and rewrites the stylesheet and
script tags to content-hashed names (subscription_webapp.<hash>.css).
Those hashed files are gitignored build artifacts, so a clean checkout
has none of them and the backend image was built without any webapp
assets. The resolver therefore stat()-ed a missing file and fell back to
the bare /subscription_webapp.css URL.

That bare URL never changes between deploys and is served no-store. Most
clients re-fetch it, but iOS WebViews (WKWebView) ignore no-store for
subresources and keep serving a stale cached copy, so after every deploy
the CSS no longer matched the markup and the Mini App looked broken on
iOS only. The earlier no-store / ?v= / Clear-Site-Data attempts could not
help because none of them gave iOS a new URL to fetch.

Copy the freshly built assets from the frontend-builder stage into the
backend image (frontend-builder is reordered ahead of the backend stage
so the copy resolves). The build is deterministic, so the hash matches
the one the nginx image serves; the shell now emits immutable, hashed
URLs that change on every asset change and force iOS to fetch fresh CSS.
2026-06-08 22:34:03 +03:00
3252a8 0db3a68c09 fix: drop Clear-Site-Data reset breaking mini app styles
The once-per-version Clear-Site-Data: "cache" header on the index
navigation raced the page's own CSS/JS subresource loads in the
Telegram WebView, intermittently evicting or aborting the main
stylesheet so the mini app rendered half-styled on mobile.

It also could not fix stale HTML: it only fires when the document
actually reaches the backend, never when the WebView serves a cached
page. The no-store HTML plus immutable content-hashed asset filenames
already guarantee freshness without clearing the cache, so remove the
reset header, its helpers, constants, and tests.
2026-06-08 22:12:16 +03:00
3252a8 c2f0ae0b8b fix: resolve webhook client IP behind proxies 2026-06-08 11:25:02 +03:00
3252a8 23ad893f69 fix: reset stale webapp cache once per asset version 2026-06-08 10:59:52 +03:00
3252a8 d2149357c6 fix: stabilize mini app mobile navigation 2026-06-08 10:32:53 +03:00
3252a8 63192659e4 fix: prevent stale mini app mobile styles 2026-06-08 10:02:46 +03:00
3252a8 3e58e01d53 ci: improve GitLab dev image builds 2026-06-08 09:41:50 +03:00
3252a8 8cbe7e01ec docs: clarify migrator data mount 2026-06-08 09:35:11 +03:00
3252a8 a99aeec0d4 fix: return from bot tariff prices to bot menu 2026-06-08 09:22:24 +03:00
3252a8 2697c30c0f fix: allow docs previews without pillow 2026-06-08 00:00:35 +03:00
3252a8 2077c27252 chore: align local checks 2026-06-07 23:57:06 +03:00
3252a8 a86f5d75e1 build: reduce docker image layer churn 2026-06-07 23:47:36 +03:00
3252a8 24faabc20a fix: improve mobile tariff row editor layout 2026-06-07 23:35:53 +03:00
3252a8 00e1f51abe fix: preserve transparent email logos 2026-06-07 23:21:34 +03:00
3252a8 4b8f939a25 perf: cache broadcast audience counts 2026-06-07 23:15:44 +03:00
3252a8 d1c4a6de80 feat: improve admin pagination controls 2026-06-07 23:03:03 +03:00
3252a8 bddcd16a07 fix: align tariff row delete buttons 2026-06-07 22:52:10 +03:00
3252a8 a8e229d530 fix: remove manual trial squad input 2026-06-07 22:48:23 +03:00
3252a8 5cee619dd0 fix: assign default tariff to referral welcome bonuses 2026-06-07 22:28:30 +03:00
3252a8 d5b23d8306 fix: quote frontend route regex in nginx 2026-06-07 22:25:08 +03:00
3252a8 9de000e78c fix: assign default tariff to promo bonuses 2026-06-07 22:23:42 +03:00
3252a8 2b6f25f0f8 fix: avoid backend theme dependency in docs build 2026-06-07 22:06:47 +03:00
3252a8 3c82f43c84 ci: split dev image publishing by registry 2026-06-06 23:44:24 +03:00
3252a8 724e936660 fix: hide email prompts when auth is disabled 2026-06-06 23:35:38 +03:00
3252a8 d263651b48 fix: route support tickets to configured topic 2026-06-06 23:27:22 +03:00
3252a8 3d5190639f docs: add GitLab links and Docker Hub compose images 2026-06-06 23:20:22 +03:00
BADtochka 9adcbf103a fix(admin): stabilize user modal lifecycle 2026-06-06 20:33:04 +03:00
BADtochka fcb8e51ec0 fix(admin): clear user route on modal close 2026-06-06 20:16:43 +03:00
BADtochka ae3d6a9b99 fix(admin): clear user route on modal close 2026-06-06 20:05:47 +03:00
BADtochka e0b3940b98 fix(admin): reset user modal state consistently 2026-06-06 19:47:57 +03:00
BADtochka 2ec7376981 fix(admin): ignore stale user modal loads 2026-06-06 19:30:29 +03:00
BADtochka 6d0084dd3a fix(admin): close support user modal reliably 2026-06-06 18:20:44 +03:00
BADtochka e3f35a461c fix(payments): restore default provider connections 2026-06-06 17:53:16 +03:00
BADtochka a75d2d7ac0 fix(payments): retry provider connect failures 2026-06-06 17:10:52 +03:00
BADtochka e5b0daf639 fix(payments): avoid stale provider connections 2026-06-06 15:39:34 +03:00
BADtochka f07031f32c fix(security): resolve forwarded client ip chain 2026-06-06 00:45:21 +03:00
BADtochka cc74ddec10 Log trusted forwarded client IPs 2026-06-06 00:37:03 +03:00
BADtochka 766f2a5780 Add global payment request timeout setting 2026-06-05 23:40:02 +03:00
BADtochka 1158a2d835 chore: update action jobs for fork support 2026-06-05 21:50:07 +03:00
BADtochka 1d8ad0f24d fix(payment): increase timeout error on create_transaction 2026-06-05 21:37:37 +03:00
3252a8 6913676420 fix: support nested remnawave activity fields 2026-06-05 16:19:53 +03:00
3252a8 6890b58ced feat: show user vpn connection activity 2026-06-05 16:14:34 +03:00