This commit is contained in:
parent
13bff800f0
commit
4c0f3087db
|
@ -11,10 +11,17 @@ map $http_origin $allow_origin {
|
||||||
}
|
}
|
||||||
|
|
||||||
{{ range $port_map := .PROXY_PORT_MAP | split " " }}
|
{{ range $port_map := .PROXY_PORT_MAP | split " " }}
|
||||||
{{ $port_map_list := $port_map | split ":" }}
|
{{ $port_map_list := $port_map | split ":" }}
|
||||||
{{ $scheme := index $port_map_list 0 }}
|
{{ printf "Processing port map: %s\n" $port_map }}
|
||||||
{{ $listen_port := index $port_map_list 1 }}
|
{{ if ge (len $port_map_list) 3 }}
|
||||||
{{ $upstream_port := index $port_map_list 2 }}
|
{{ $scheme := index $port_map_list 0 }}
|
||||||
|
{{ $listen_port := index $port_map_list 1 }}
|
||||||
|
{{ $upstream_port := index $port_map_list 2 }}
|
||||||
|
{{ printf "Scheme: %s, Listen Port: %s, Upstream Port: %s\n" $scheme $listen_port $upstream_port }}
|
||||||
|
{{ else }}
|
||||||
|
{{ printf "Invalid port map entry: %s\n" $port_map }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
{{ if eq $scheme "http" }}
|
{{ if eq $scheme "http" }}
|
||||||
|
|
|
@ -48,7 +48,7 @@ async def get_author(_, _info, slug='', author_id=None):
|
||||||
if author_id:
|
if author_id:
|
||||||
cache_key = f'author:{author_id}'
|
cache_key = f'author:{author_id}'
|
||||||
cache = await redis.execute('GET', cache_key)
|
cache = await redis.execute('GET', cache_key)
|
||||||
logger.debug(f'result from {cache_key}: {cache}')
|
logger.debug(f'GET {cache_key} -> {cache}')
|
||||||
q = select(Author).where(Author.id == author_id)
|
q = select(Author).where(Author.id == author_id)
|
||||||
author_dict = None
|
author_dict = None
|
||||||
if cache:
|
if cache:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user