>>>>> Steinar Bang <[email protected]>: > Platform: debian 10.9 "buster", openjdk-11 11.0.11+9-1~deb10u1, shiro 1.7.0 > I would like shiro to redirect to a page of my own instead of the > default 401 page.
Er... my bad! I was editing the wrong shiro.ini file. I wondered why there was no role in it and found the actual one when looking for the role. I will remove the unused shiro.ini file so I won't be bitten again. Here is the working shiro.ini with shiro.unauthorizedUrl: [main] authc = org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter shiro.loginUrl = /login shiro.unauthorizedUrl = /unauthorized [users] [urls] / = authc /api/login = anon /api/** = authc [users] [urls] / = roles[handleregbruker] /hurtigregistrering = roles[handleregbruker] /statistikk/** = roles[handleregbruker] /favoritter/** = roles[handleregbruker] /nybutikk = roles[handleregbruker] /endrebutikk = roles[handleregbruker] /api/login = anon /api/** = roles[handleregbruker]
