mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-16 02:19:08 +00:00
further social improvements, client-render edge cases
This commit is contained in:
parent
dd07e6bac4
commit
1c784d0605
4 changed files with 9 additions and 7 deletions
|
@ -34,7 +34,7 @@ const Hider = styled.div`
|
|||
|
||||
class Server extends React.Component<ServerPageProps> {
|
||||
static async getInitialProps (ctx: *, rpc: *, router: *) {
|
||||
const isDiscordBot = ctx.req.headers['user-agent'].includes('Discordbot')
|
||||
const isDiscordBot = ctx.req && ctx.req.headers['user-agent'].includes('Discordbot')
|
||||
if (ctx.user == null) {
|
||||
if (!isDiscordBot) {
|
||||
redirect(ctx, `/auth/login?r=${router.asPath}`)
|
||||
|
|
|
@ -129,10 +129,6 @@ export default class AuthLogin extends React.Component<AuthLoginProps, AuthLogin
|
|||
redirect(ctx, r || '/')
|
||||
}
|
||||
|
||||
if (ctx.req.headers['user-agent'].contains('Discordbot')) {
|
||||
redirect(ctx, '/_internal/_discordbot/_login')
|
||||
}
|
||||
|
||||
ctx.robots = 'NOINDEX, NOFOLLOW'
|
||||
|
||||
if (r != null) {
|
||||
|
|
BIN
ui/static/social.png
Normal file
BIN
ui/static/social.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
Loading…
Add table
Add a link
Reference in a new issue