Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Задавать урл приложения через переменные окружения. #167

Open
fey opened this issue Apr 30, 2021 · 0 comments

Comments

@fey
Copy link
Contributor

fey commented Apr 30, 2021

Кейс: приложение находится за реверс прокси. Само приложение работает на любом порту

Открываем приложение например на 80/443 порту. Отправляем форму (например создание пользователя), нас перенаправляет на localhost:8080, получаем ошибку CSRF Mismatch, потому что нас будет перенаправлять на
localhost:<port>

const host = `http://${this.config.host}:${this.config.port}`;

Как должно быть

У пользователя формируются ссылки с хостом с которого пришел или базовый урл приложения задается в переменных окружения.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant