-
Notifications
You must be signed in to change notification settings - Fork 57
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
[BUG] Blocked request. Host not allowed. #266
Comments
change the file vite.config.ts import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [sveltekit()],
preview: {
allowedHosts: ['test.testdomain.com']
}
}); |
While we certainly could change the container and rebuild, that kind of defeats half the purpose of using docker in the first place. It would be nice if perhaps this configuration was able to pull allowed hosts from environment variables. I was trying to self host on my server and ran into several problems, including this one. |
I'm not super familiar with Kubernetes but I just put out a new PR with an updated config to specify allowed hosts. With these new changes you'd need to run the docker container as such: docker run --rm -d -p 4173:4173 \
-e VITE_ALLOWED_HOSTS='your-domain.com,another-domain.com' \
--name hollama ghcr.io/fmaclen/hollama:latest If @prudhvikrishnap Can you confirm if this will work with your setup? |
@fmaclen I built docker image and tested the code locally. By configuring the VITE_ALLOWED_HOSTS variable, I was able to access to the webpage when using a custom host. I also tested the scenario where the hosts variable was removed, which resulted in the error mentioned above. The changes in the pull request were successful and worked as expected on my end. |
🎉 This issue has been resolved in version 0.27.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
@prudhvikrishnap thanks for confirming the implementation. You should be able to pull the latest version of the image from the Docker hub. |
Description:
Not able to access UI when self-hosting on k8s. This error is not occurring when using version 0.24.0 on k8s.
Docker Image Tag:
ghcr.io/fmaclen/hollama:latest
Error:
Reproduce Issue
ghcr.io/fmaclen/hollama:latest
The text was updated successfully, but these errors were encountered: