Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
aa.gusti
/
opensipkd-base
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 69225681
authored
Apr 10, 2026
by
aa.gustiana@gmail.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update headers
1 parent
a394cfff
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
opensipkd/base/__init__.py
opensipkd/base/__init__.py
View file @
6922568
...
...
@@ -769,16 +769,16 @@ from pyramid.httpexceptions import HTTPBadRequest, HTTPFound
from
pyramid.security
import
forget
from
pyramid.view
import
exception_view_config
@exception_view_config
(
HTTPBadRequest
)
def
bad_request_view
(
exc
,
request
):
# Bersihkan sesi autentikasi (logout)
headers
=
forget
(
request
)
# Arahkan ulang ke halaman login (misalnya route 'login')
request
.
session
.
flash
(
"Permintaan tidak valid. Silakan ulangi kembali."
)
referrer
=
request
.
referrer
or
request
.
route_url
(
'base-home'
)
response
=
HTTPFound
(
location
=
referrer
)
response
.
headers
.
extend
(
headers
)
return
response
#
@exception_view_config(HTTPBadRequest)
#
def bad_request_view(exc, request):
#
# Bersihkan sesi autentikasi (logout)
#
headers = forget(request)
#
# Arahkan ulang ke halaman login (misalnya route 'login')
#
request.session.flash("Permintaan tidak valid. Silakan ulangi kembali.")
#
referrer = request.referrer or request.route_url('base-home')
#
response = HTTPFound(location=referrer)
#
response.headers.extend(headers)
#
return response
from
.depreciated_base
import
*
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment