Use sessid and not token and fix get_username

This commit is contained in:
Alex Ling
2022-03-21 03:41:24 +00:00
parent c3736d222c
commit 0d52544617
4 changed files with 38 additions and 11 deletions

View File

@@ -24,9 +24,15 @@ class Server
ReaderRouter.new
APIRouter.new
options "/api/*" do |env|
cors
halt env
{% for path in %w(/api/* /uploads/* /img/*) %}
options {{path}} do |env|
cors
halt env
end
{% end %}
static_headers do |response|
response.headers.add("Access-Control-Allow-Origin", "*")
end
Kemal.config.logging = false