Discuss Scratch

kvackkvack
Scratcher
500+ posts

scratch.mit.edu/?user=<username>&password=<password> has the old frontpage.

So if you go to https://scratch.mit.edu/?user=<your_username>&password=<your_password> the old frontpage appears instead of the new one??? Is this happening for anybody else? Seems weird that this would be a thing, but this could be useful for the people who hate the new frontpage.

Last edited by kvackkvack (Oct. 30, 2015 20:09:34)

__init__
Scratcher
1000+ posts

scratch.mit.edu/?user=<username>&password=<password> has the old frontpage.

I get it too

thisandagain pls explain
kvackkvack
Scratcher
500+ posts

scratch.mit.edu/?user=<username>&password=<password> has the old frontpage.

__init__ wrote:

I get it too
Huh.
djdolphin
Scratcher
1000+ posts

scratch.mit.edu/?user=<username>&password=<password> has the old frontpage.

kvackkvack
Scratcher
500+ posts

scratch.mit.edu/?user=<username>&password=<password> has the old frontpage.

djdolphin wrote:

https://scratch.mit.edu/? works too.
Userscript for getting the old frontpage back, then:
if(window.location.href == "https://scratch.mit.edu/") {
    window.location = "https://scratch.mit.edu/?"
}
Probably terrible code.

Last edited by kvackkvack (Nov. 7, 2015 19:39:33)

comp09
Scratcher
1000+ posts

scratch.mit.edu/?user=<username>&password=<password> has the old frontpage.

It looks like they are just rewriting “/” to staging.scratch.mit.edu. How hacky.


Visit the website of Andrew Sun!


Firedrake969
Scratcher
1000+ posts

scratch.mit.edu/?user=<username>&password=<password> has the old frontpage.

So they're checking that GET isn't passing variables, and redirecting based on that? (because django url routing doesn't care about the ? params)
why?

'17 rickoid

bf97b44a7fbd33db070f6ade2b7dc549
comp09
Scratcher
1000+ posts

scratch.mit.edu/?user=<username>&password=<password> has the old frontpage.

Firedrake969 wrote:

So they're checking that GET isn't passing variables, and redirecting based on that? (because django url routing doesn't care about the ? params)
why?
I have a feeling they are doing the routing at the Varnish level.


Visit the website of Andrew Sun!


__init__
Scratcher
1000+ posts

scratch.mit.edu/?user=<username>&password=<password> has the old frontpage.

Thisandagain pls explain

thisandagain pls explain
Rumanti
Scratcher
1000+ posts

scratch.mit.edu/?user=<username>&password=<password> has the old frontpage.

__init__ wrote:

Thisandagain pls explain
^ Could not be more accurate..

:wq
Firedrake969
Scratcher
1000+ posts

scratch.mit.edu/?user=<username>&password=<password> has the old frontpage.

comp09 wrote:

Firedrake969 wrote:

So they're checking that GET isn't passing variables, and redirecting based on that? (because django url routing doesn't care about the ? params)
why?
I have a feeling they are doing the routing at the Varnish level.
If you mean Varnish cache, probably not, because it's a cache (unless I'm missing something?)
Django doesn't really work without URL routing, and the forums are pretty integrated with the main site, so I'm fairly sure Django is doing the routing.

'17 rickoid

bf97b44a7fbd33db070f6ade2b7dc549
CatsUnited
Scratcher
1000+ posts

scratch.mit.edu/?user=<username>&password=<password> has the old frontpage.

kvackkvack wrote:

Probably terrible code.
Might seem bad but it works.

__init__ wrote:

Thisandagain pls explain
+1337

bottom text
comp09
Scratcher
1000+ posts

scratch.mit.edu/?user=<username>&password=<password> has the old frontpage.

Firedrake969 wrote:

comp09 wrote:

Firedrake969 wrote:

So they're checking that GET isn't passing variables, and redirecting based on that? (because django url routing doesn't care about the ? params)
why?
I have a feeling they are doing the routing at the Varnish level.
If you mean Varnish cache, probably not, because it's a cache (unless I'm missing something?)
Django doesn't really work without URL routing, and the forums are pretty integrated with the main site, so I'm fairly sure Django is doing the routing.
Varnish is the application that you hit when you visit Scratch. It's a caching reverse proxy.


Visit the website of Andrew Sun!


Firedrake969
Scratcher
1000+ posts

scratch.mit.edu/?user=<username>&password=<password> has the old frontpage.

Makes sense.

'17 rickoid

bf97b44a7fbd33db070f6ade2b7dc549
PullJosh
Scratcher
1000+ posts

scratch.mit.edu/?user=<username>&password=<password> has the old frontpage.

Rumanti wrote:

__init__ wrote:

Thisandagain pls explain
^ Could not be more accurate..
It'll take a while to get used to not having to just guess all the time. xD
Jonathan50
Scratcher
1000+ posts

scratch.mit.edu/?user=<username>&password=<password> has the old frontpage.

comp09 wrote:

Varnish is the application that you hit when you visit Scratch. It's a caching reverse proxy.
I thought Scratch used nginx… what's the difference?

Not yet a Knight of the Mu Calculus.
comp09
Scratcher
1000+ posts

scratch.mit.edu/?user=<username>&password=<password> has the old frontpage.

Jonathan50 wrote:

comp09 wrote:

Varnish is the application that you hit when you visit Scratch. It's a caching reverse proxy.
I thought Scratch used nginx… what's the difference?
Why use Varnish when you can use

Jokes aside, nginx is an all in one cache/proxy/web server, while Varnish is just for the high speed caching.


Visit the website of Andrew Sun!


Jonathan50
Scratcher
1000+ posts

scratch.mit.edu/?user=<username>&password=<password> has the old frontpage.

What does Scratch use then? Varnish and/or nginx?

Not yet a Knight of the Mu Calculus.
comp09
Scratcher
1000+ posts

scratch.mit.edu/?user=<username>&password=<password> has the old frontpage.

Jonathan50 wrote:

What does Scratch use then? Varnish and/or nginx?
I think they just use Varnish in front of Django.


Visit the website of Andrew Sun!


Jonathan50
Scratcher
1000+ posts

scratch.mit.edu/?user=<username>&password=<password> has the old frontpage.

comp09 wrote:

Jonathan50 wrote:

What does Scratch use then? Varnish and/or nginx?
I think they just use Varnish in front of Django.
?
On Scratch 1.4 you got nginx error messages and in scratch 2.0 going to http://scratch.mit.edu:443 used to give an nginx error message (it just doesn't respond anymore)
I just tested it now and there is no Server header but there are these:
HTTP/1.1 200 OK
Accept-Ranges:bytes
Age:374903
Cache-Control:public, max-age=31536000
Connection:keep-alive
Content-Encoding:gzip
Content-Length:1083
Content-Type:text/html; charset=utf-8
Date:Sat, 31 Oct 2015 03:27:14 GMT
Etag:W/"ab09c697e646dc152ce9aaeb39db7bce"
Fastly-Debug-Digest:026dcf2a00ef3a49ed5ca70cd169ec69eeb2e90e9bfe7e2550a32454d86d76e1
Vary:Accept-Encoding
Via:1.1 varnish
Via:1.1 varnish
X-Cache:HIT, HIT
X-Cache-Hits:1, 5576
X-Served-By:cache-iad2150-IAD, cache-akl6420-AKL
X-Timer:S1446262034.429249,VS0,VE0

Not yet a Knight of the Mu Calculus.

Powered by DjangoBB