mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-26 01:46:18 -05:00
Adding link to /docs for new Sanic version.
This commit is contained in:
parent
72cb9ce4ff
commit
56f31639db
4 changed files with 19 additions and 9 deletions
|
|
@ -8,7 +8,7 @@ import tempfile
|
|||
from dataclasses import dataclass
|
||||
from datetime import datetime
|
||||
from itertools import groupby
|
||||
from typing import Iterator, Optional
|
||||
from typing import Iterator, Optional, Tuple, List
|
||||
|
||||
import requests
|
||||
from bs4 import BeautifulSoup
|
||||
|
|
@ -562,7 +562,7 @@ def get_domains():
|
|||
return domains
|
||||
|
||||
|
||||
def search(search_str: str, domain: str, limit: int, offset: int):
|
||||
def search(search_str: str, domain: str, limit: int, offset: int) -> Tuple[List[Archive], int]:
|
||||
with get_db_curs() as curs:
|
||||
columns = 'id, COUNT(*) OVER() AS total'
|
||||
params = dict(offset=offset, limit=limit)
|
||||
|
|
|
|||
11
nginx.conf
11
nginx.conf
|
|
@ -29,19 +29,24 @@ http {
|
|||
location / {
|
||||
# React APP
|
||||
proxy_pass http://127.0.0.1:5000;
|
||||
rewrite $1 break;
|
||||
rewrite $1 break;
|
||||
}
|
||||
|
||||
location /sockjs-node {
|
||||
proxy_pass http://127.0.0.1:5000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
}
|
||||
|
||||
location /api {
|
||||
proxy_pass http://127.0.0.1:8081;
|
||||
rewrite /^api(.*)$ $1 break;
|
||||
rewrite /^api(.*)$ $1 break;
|
||||
}
|
||||
|
||||
location /docs {
|
||||
proxy_pass http://127.0.0.1:8081;
|
||||
rewrite /^docs(.*)$ $1 break;
|
||||
}
|
||||
|
||||
location /media {
|
||||
|
|
|
|||
|
|
@ -22,19 +22,24 @@ http {
|
|||
location / {
|
||||
# React APP
|
||||
proxy_pass http://app:3000;
|
||||
rewrite $1 break;
|
||||
rewrite $1 break;
|
||||
}
|
||||
|
||||
location /sockjs-node {
|
||||
proxy_pass http://app:3000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
}
|
||||
|
||||
location /api {
|
||||
proxy_pass http://api:8081;
|
||||
rewrite /^api(.*)$ $1 break;
|
||||
rewrite /^api(.*)$ $1 break;
|
||||
}
|
||||
|
||||
location /docs {
|
||||
proxy_pass http://api:8081;
|
||||
rewrite /^docs(.*)$ $1 break;
|
||||
}
|
||||
|
||||
location /media {
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ index_html = '''
|
|||
This is a WROLPi API.
|
||||
<ul>
|
||||
<li>You can test it at this endpoint <a href="/api/echo">/api/echo</a></li>
|
||||
<li>You can view the docs at <a href="/swagger">/swagger</a></li>
|
||||
<li>You can view the docs at <a href="/docs">/docs</a></li>
|
||||
</ul>
|
||||
</p>
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue