PostgreSQL (pgAdmin) и межсайтовый Cook ie предупреждения - PullRequest
3 голосов
/ 14 июля 2020

Я использую python 3.7.4, django 3.0.6, javascript, Postgres 12.3.1. Когда моя страница загружается на консоль, появляются следующие предупреждения:

Cookie “PGADMIN_KEY” will be soon treated as cross-site cookie against “http://127.0.0.1:8000/lists/list-name/” because the scheme does not match. list-name
Cookie “PGADMIN_LANGUAGE” will be soon treated as cross-site cookie against “http://127.0.0.1:8000/lists/list-name/” because the scheme does not match. list-name
Cookie “PGADMIN_KEY” will be soon treated as cross-site cookie against “http://127.0.0.1:8000/lists/list-name/” because the scheme does not match. list-name
Cookie “PGADMIN_LANGUAGE” will be soon treated as cross-site cookie against “http://127.0.0.1:8000/lists/list-name/” because the scheme does not match. list-name
Cookie “PGADMIN_KEY” will be soon treated as cross-site cookie against “http://127.0.0.1:8000/static/lists/js/lists.js” because the scheme does not match. lists.js
Cookie “PGADMIN_LANGUAGE” will be soon treated as cross-site cookie against “http://127.0.0.1:8000/static/lists/js/lists.js” because the scheme does not match. lists.js
Cookie “PGADMIN_KEY” will be soon treated as cross-site cookie against “http://127.0.0.1:8000/jsi18n/” because the scheme does not match. jsi18n
Cookie “PGADMIN_LANGUAGE” will be soon treated as cross-site cookie against “http://127.0.0.1:8000/jsi18n/” because the scheme does not match. jsi18n
Cookie “PGADMIN_KEY” will be soon treated as cross-site cookie against “http://127.0.0.1:8000/static/js/common.js” because the scheme does not match. common.js
Cookie “PGADMIN_LANGUAGE” will be soon treated as cross-site cookie against “http://127.0.0.1:8000/static/js/common.js” because the scheme does not match. common.js
Cookie “PGADMIN_KEY” will be soon treated as cross-site cookie against “http://127.0.0.1:8000/static/icons/favicon.png” because the scheme does not match. favicon.png
Cookie “PGADMIN_LANGUAGE” will be soon treated as cross-site cookie against “http://127.0.0.1:8000/static/icons/favicon.png” because the scheme does not match. favicon.png

Они должны исходить из новой политики в отношении файлов cookie . Проблема в том, что PGADMIN_KEY и PGADMIN_LANGUAGE являются куки-файлами PGAdmin (PostgreSQL), и я не использую их явно (я имею в виду, очевидно, сама база данных использует их, но в моем коде они не отображаются), так как я могу решить эту проблему?

  • Это ошибка PGAdmin, и все, что я могу сделать, это дождаться новой версии PGAdmin, где эта ошибка будет исправлена?
  • Я должен явно объявить их в моем коде (где ???) с параметрами SameSite=none; Secure?
  • другое?

Спасибо за вашу помощь.

PS

Я задал еще один вопрос, и кто-то в удаленном комментарии (вздох, не удаляйте комментарии, пожалуйста) сказал, что что-то вроде /localhost/ считается отличным от /127.0.0.1:8000/. Не знаю, поможет ли мне это

1 Ответ

1 голос
/ 30 июля 2020

Я решил обновить pgAdmin до последней версии (та, которая включена в PostgreSQL, не является последней) И удалить файлы cookie, хранящиеся в кеше.

...