Display dismissible banner on proxy sites

Description

If someone is accessing the Archive via a proxy site, we want to use JavaScript to show them a banner with the following text:

Important message:

1. You are using a proxy site that is not part of the Archive of Our Own.

2. The entity that set up the proxy site can see what you submit, including your IP address. If you log in through the proxy site, it can see your password.

重要提示:

1. 您使用的是第三方开发的反向代理网站,此网站并非Archive of Our Own - AO3(AO3作品库)原站。

2. 代理网站的开发者能够获取您上传至该站点的全部内容,包括您的ip地址。如您通过代理登录AO3,对方将获得您的密码。

The banner should be dismissible, and cookie should prevent its return for the duration of the browser session.

Testing (Outdated)

james_ will need to temporarily change ArchiveConfig.APP_HOST to something other than archiveofourown.org. That should make the proxy banner appear, and assuming the site remains accessible when that happens, you should be able to test it.

Failing that, we’ll just have to wait until it’s deployed and then check on a known proxy.

Testing (Current)

james_ will need to temporarily remove test.archiveofourown.org from ArchiveConfig.PERMITTED_HOSTS to allow the banner to display on staging.

Activity

Show:
Sarken
August 10, 2020, 12:45 AM

Deployed to staging, but needs a config change.

cosette
August 13, 2020, 11:47 AM
Edited
  • the banner displays as expected when accessing test.archiveofourown.org with javascript enabled

  • the banner does not display when accessing the site with javascript disabled (as expected)

  • after dismissing it, the banner does not reappear while browsing the site

  • logging in does not cause the banner to re-appear

  • closing the window and revisiting the site causes the banner to appear again 👍

  • the banner does not display on http://insecure-test.archiveofourown.org

Sarken
August 14, 2020, 8:52 AM

james_ posted a screenshot in Slack and confirmed it didn’t show up on insecure.

DeployedToBeta

Assignee

Sarken

Reporter

Sarken

Roadmap

Misc

Priority

High

Affects versions

Fix versions

Components

FrontEnd

Difficulty

Medium

Milestone

Internal 0.9
Configure