Skip to content
Snippets Groups Projects
Verified Commit d146d637 authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

Logujeme referrer

parent 9abe7344
No related branches found
No related tags found
No related merge requests found
Pipeline #10829 passed
1.1.1
1.2.0
......@@ -17,8 +17,9 @@ sub redirect ($c) {
}
$shortcut->add_to_log_items({
ip => ($c->forwarded_for || $c->tx->remote_address),
ua => $c->req->headers->user_agent,
ip => ($c->forwarded_for || $c->tx->remote_address),
ua => $c->req->headers->user_agent,
referrer => $c->req->headers->referrer,
});
$c->res->code($shortcut->code);
......
......@@ -21,6 +21,7 @@ __PACKAGE__->add_columns(
shortcut_id
ip
ua
referrer
),
);
......
......@@ -47,3 +47,6 @@ create index "shortcuts_shortcut_idx" on "shortcuts" ("shortcut");
-- 3 up
alter table "log" add column "ua" text;
-- 4 up
alter table "log" add column "referrer" text;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment