8000 introduce baseurl and remove force_https by dni · Pull Request #1549 · lnbits/lnbits · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

introduce baseurl and remove force_https #1549

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 28, 2023
Merged

introduce baseurl and remove force_https #1549

merged 2 commits into from
Feb 28, 2023

Conversation

dni
Copy link
Member
@dni dni commented Feb 25, 2023

IDEA: introduce BASEURL variable like other webapplications also have

this PR introduces the settings variable LNBITS_BASEURL

this makes generating URLs on the serverside much easier for developers.
you do not need to rely on a request object anymore to create an absolute URL,
for example for all the lnurl stuff, server startup log/superuser urls, etc...

the obvious downside is that users need to introduce a new variable if they are behind a proxy.

but i think it is tradeoff worth taking, because this will reduce the overall complexity of the code
and also simplyfies generating proper url for other developers aswell.

also gets rid of LNBITS_FORCE_HTTPS variable, because it is not used anymore.

@codecov-commenter
Copy link
codecov-commenter commented Feb 25, 2023

Codecov Report

Merging #1549 (18ec854) into main (f943ca7) will decrease coverage by 0.01%.
The diff coverage is 33.33%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main    #1549      +/-   ##
==========================================
- Coverage   46.87%   46.87%   -0.01%     
==========================================
  Files          48       48              
  Lines        6841     6842       +1     
==========================================
  Hits         3207     3207              
- Misses       3634     3635       +1     
Impacted Files Coverage Δ
lnbits/app.py 45.37% <0.00%> (-0.20%) ⬇️
lnbits/core/services.py 44.10% <0.00%> (ø)
lnbits/settings.py 86.73% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@callebtc callebtc merged commit 6f194fe into main Feb 28, 2023
@callebtc callebtc deleted the feat-baseurl branch February 28, 2023 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0