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

Fix experimental native embedding and remove VITE_APP_URL #167

Conversation

PhilReinking
Copy link
Contributor

I changed the way the server url is passed to the classic form script. Before it was necessary that the server url is available on build time. Due to some changes this haven't been the case for a longer period at all.

Since self-hosted instances have different urls, the server url needs to be somehow passed to the script. This is now done in two ways:

  1. If the form is requested through a normal page view, we use the window location (aka server url)
  2. If the form is embedded in a different page, we pass down the server url through the embed script data attributes (data-server-url)

I also added a new middleware for some routes which were previously unprotected if a form was unpublished.

Also the embedded form show now a 404 state instead of an error, when the form is not fetchable.

@PhilReinking PhilReinking merged commit b3bca0b into main Aug 24, 2024
4 checks passed
@PhilReinking PhilReinking deleted the 146-experimental-native-embedding-feature-has-strange-vite_app_url-var-value branch August 26, 2024 19:16
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

Successfully merging this pull request may close these issues.

1 participant