Adding link to /docs for new Sanic version.

This commit is contained in:
Roland 2022-02-03 10:07:04 -07:00
parent 72cb9ce4ff
commit 56f31639db
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
4 changed files with 19 additions and 9 deletions

View file

@ -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)

View file

@ -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 {

View file

@ -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 {

View file

@ -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>