Fixed /register/ redirecting to service_worker.js (Safari specific)

arn

Well-known member
I think this is a Cloudflare issue, but I thought Xenforo might have some ideas, since it is affecting this site as well.

On this site, if I visit this url while logged in:

https://xenforo.com/community/register/ (Open it in a fresh window)

I get redirected to

https://xenforo.com/community/service_worker.js

This is also happening on my site as well. service_worker.js is a Cloudflare thing I believe. What I can't figure out is why this redirect is happening.

arn
 

JoyFreak

Well-known member
I think this is a Cloudflare issue, but I thought Xenforo might have some ideas, since it is affecting this site as well.

On this site, if I visit this url while logged in:

https://xenforo.com/community/register/ (Open it in a fresh window)

I get redirected to

https://xenforo.com/community/service_worker.js

This is also happening on my site as well. service_worker.js is a Cloudflare thing I believe. What I can't figure out is why this redirect is happening.

arn
Just followed the steps and it doesn't seem to happen for me.
 

Mike

XenForo developer
Staff member
I can't reproduce this, but what browser/version as it'll be a specific behavior? (Safari perhaps?)

That would seem to indicate that the service worker is being sent as the referrer, which doesn't really make any sense.
 

arn

Well-known member
I can't reproduce this, but what browser/version as it'll be a specific behavior? (Safari perhaps?)

That would seem to indicate that the service worker is being sent as the referrer, which doesn't really make any sense.
Ah, that last bit makes some sense.

Safari 14.0.1.

So what happens if there's an empty referrer for the XenForo redirect? It does only happen when I open a new window.
I get redirected to this page again...

maybe it's the last page you looked at?

You have to open it in a fresh window.
 

arn

Well-known member
Ah, that last bit makes some sense.

Safari 14.0.1.

So what happens if there's an empty referrer for the XenForo redirect? It does only happen when I open a new window.

I see in chrome, it takes me to the main index.

i'm redirected to this thread...

If you are being redirected to this thread, you didn't open it in a new window.
 

nicodak

Well-known member
If you are being redirected to this thread, you didn't open it in a new window.
I opened it in a fresh windows (not a tab) and i was redirected to this thread.

If i copy/past the link to an other browser (Edge) i'm redirect to the Forum home page
 

arn

Well-known member
I opened it in a fresh windows (not a tab) and i was redirected to this thread.

If i copy/past the link to an other browser (Edge) i'm redirect to the Forum home page
ah my apologies. I figured it wouldn't be able to know which thread you were in if u opened it in a new window.
 

JoyFreak

Well-known member
I opened it in a fresh windows (not a tab) and i was redirected to this thread.

If i copy/past the link to an other browser (Edge) i'm redirect to the Forum home page
I done exactly the same and getting same results. I'm on Chrome so could be related to safari.
 

arn

Well-known member
I can't reproduce this, but what browser/version as it'll be a specific behavior? (Safari perhaps?)

That would seem to indicate that the service worker is being sent as the referrer, which doesn't really make any sense.

I made a php script that echos the referrer:

Screen Shot 2020-12-14 at 10.11.57 AM.png
So, yeah... seems that's what's happening.
 

DeltaHF

Well-known member
I can confirm this, but only on Safari. I'm still on macOS Catalina with Safari Version 14.0.1 (15610.2.11.51.10, 15610).

Chrome does not appear to be affected.
 

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.3).

Change log:
Fix a situation where Safari would redirect to the service worker JS file.
There may be a delay before changes are rolled out to the XenForo Community.
 
Top