mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-15 12:46:38 +00:00
Merge branch 'main' into production
This commit is contained in:
commit
5f783e4fd1
2 changed files with 6 additions and 3 deletions
|
@ -19,7 +19,7 @@ You can request an invite by entering your email address at https://bookwyrm.soc
|
||||||
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
See [contributing](https://docs.joinbookwyrm.com/contributing.html) for code, translation or monetary contributions.
|
See [contributing](https://docs.joinbookwyrm.com/how-to-contribute.html) for code, translation or monetary contributions.
|
||||||
|
|
||||||
## About BookWyrm
|
## About BookWyrm
|
||||||
### What it is and isn't
|
### What it is and isn't
|
||||||
|
@ -82,4 +82,4 @@ Deployment
|
||||||
The application is set up to share book and author data between instances, and get book data from arbitrary outside sources. Right now, the only connector is to OpenLibrary, but other connectors could be written.
|
The application is set up to share book and author data between instances, and get book data from arbitrary outside sources. Right now, the only connector is to OpenLibrary, but other connectors could be written.
|
||||||
|
|
||||||
## Set up Bookwyrm
|
## Set up Bookwyrm
|
||||||
See the [installation instructions](https://docs.joinbookwyrm.com/developer-environment.html) on how to set up Bookwyrm in developer environment or production.
|
The [documentation website](https://docs.joinbookwyrm.com/) has instruction on how to set up Bookwyrm in a [developer environment](https://docs.joinbookwyrm.com/developer-environment.html) or [production](https://docs.joinbookwyrm.com/installing-in-production.html).
|
||||||
|
|
|
@ -70,7 +70,10 @@ def is_blocked_user_agent(request):
|
||||||
user_agent = request.headers.get("User-Agent")
|
user_agent = request.headers.get("User-Agent")
|
||||||
if not user_agent:
|
if not user_agent:
|
||||||
return False
|
return False
|
||||||
url = re.search(r"https?://{:s}/?".format(regex.domain), user_agent).group()
|
url = re.search(r"https?://{:s}/?".format(regex.domain), user_agent)
|
||||||
|
if not url:
|
||||||
|
return False
|
||||||
|
url = url.group()
|
||||||
return models.FederatedServer.is_blocked(url)
|
return models.FederatedServer.is_blocked(url)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue