golemfactory / yapapi

Python high-level API for Golem.
https://yapapi.readthedocs.io/en/stable/
GNU Lesser General Public License v3.0
48 stars 23 forks source link

The example webapp fails to correclty redirect after accepting form input #1079

Closed grisha87 closed 1 year ago

grisha87 commented 1 year ago

Description

Environment: Running the dApp example on https://dapp.golem.network

Description of the issue:

  1. The users are able to start the application and display the HTML with the input field.
  2. They provide the value to the input and submit the form.
  3. Normally they should be redirected back to the page with the form and the value from the input presented underneath the form.

Actual result: After the form submission is accepted, the application redirects the user to a wrong URL, leading to "website unavailable issue". Visiting the deployed application once again shows that the value was accepted and added to the database, but the app failed to redirect property.

Logs and any additional context

The app was correctly deployed under: https://7629380123e44dabb2124cd7272420c6.dapp.golem.network/

The form submission results with the following redirect response header:

location: http://dapp-7629380123e44dabb2124cd7272420c6/

Which ultimately breaks the use-case.

shadeofblue commented 1 year ago

the nginx proxy on dapp.golem.network passes a malformed header to the application,

Host: dapp-99040cfcddf246979a2af403470e38c2

should be:

Host: 99040cfcddf246979a2af403470e38c2.dapp.golem.network

@etam @jiivan could you please update the nginx's config so that it passes the full one?

shadeofblue commented 1 year ago

fixed