Commit 6f833471 authored by Ghitha Dinan's avatar Ghitha Dinan

file directory fixing

parent 19ac4549
...@@ -9,8 +9,6 @@ import id.co.sangkuriang.inovasi.daerah.master.constant.* ...@@ -9,8 +9,6 @@ import id.co.sangkuriang.inovasi.daerah.master.constant.*
import id.co.sangkuriang.inovasi.daerah.master.helpers.RequestHelpers import id.co.sangkuriang.inovasi.daerah.master.helpers.RequestHelpers
import id.co.sangkuriang.inovasi.daerah.master.model.response.ReturnData import id.co.sangkuriang.inovasi.daerah.master.model.response.ReturnData
import id.co.sangkuriang.inovasi.daerah.master.pojo.Users import id.co.sangkuriang.inovasi.daerah.master.pojo.Users
import id.co.sangkuriang.inovasi.daerah.master.utility.getFullUrl
import id.co.sangkuriang.inovasi.daerah.master.utility.getPathUrl
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken import org.springframework.security.authentication.UsernamePasswordAuthenticationToken
import org.springframework.security.core.context.SecurityContextHolder import org.springframework.security.core.context.SecurityContextHolder
import org.springframework.web.util.ContentCachingRequestWrapper import org.springframework.web.util.ContentCachingRequestWrapper
...@@ -111,12 +109,12 @@ class TokenInterceptor : Filter { ...@@ -111,12 +109,12 @@ class TokenInterceptor : Filter {
AUDIENCE_FILTER_PATH[audience]?.forEach lambda@{ AUDIENCE_FILTER_PATH[audience]?.forEach lambda@{
if (it.contains("/*")) { if (it.contains("/*")) {
if (getPathUrl(request).contains(it.replaceFirst("/", "").replace("/*", ""))) { if (request.requestURI.contains(it.replace("/*", ""))) {
isAllowed = true isAllowed = true
return@lambda return@lambda
} }
} else { } else {
if (getFullUrl(request).contains(it)) { if (request.requestURI == it) {
isAllowed = true isAllowed = true
return@lambda return@lambda
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment