QuivrHQ / quivr

Your GenAI Second Brain 🧠 A personal productivity assistant (RAG) ⚡️🤖 Chat with your docs (PDF, CSV, ...) & apps using Langchain, GPT 3.5 / 4 turbo, Private, Anthropic, VertexAI, Ollama, LLMs, Groq that you can share with users ! Local & Private alternative to OpenAI GPTs & ChatGPT powered by retrieval-augmented generation.

Home Page:https://quivr.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to change the access URL of the app from http://localhost:3000/login to http://local.example.com:3000/login.

wangshuai-wuhan opened this issue · comments

The Feature

How to change the access URL of the app from http://localhost:3000/login to http://local.example.com:3000/login.

Motivation, pitch

http://local.example.com Setting up a proxy is more convenient.

Twitter / LinkedIn details

No response

Hey there @wangshuai-wuhan! Fancy seeing you back here 🎉

To change the access URL of the Quivr app from http://localhost:3000/login to http://local.example.com:3000/login, you need to modify the NEXT_PUBLIC_FRONTEND_URL environment variable in your configuration file. Here's how you can do it:

  1. Open your configuration file and locate the line:
NEXT_PUBLIC_FRONTEND_URL=http://localhost:*
  1. Replace it with:
NEXT_PUBLIC_FRONTEND_URL=http://local.example.com:*

This change will instruct the Quivr frontend to use http://local.example.com:3000 as its base URL instead of http://localhost:3000. After making this change, remember to restart your Quivr application for the changes to take effect.

The NEXT_PUBLIC_FRONTEND_URL environment variable is used within the Quivr codebase in the ContentSecurityPolicy object for the following directives:

  1. default-src
  2. media-src
  3. script-src
  4. style-src

These directives are part of the Content Security Policy (CSP) settings, which help in preventing various types of attacks, including Cross-Site Scripting (XSS) and data injection attacks. The variable is used to specify the allowed sources for loading resources such as scripts, styles, and media from the frontend URL. You can find more details in the frontend/next.config.js file.

As for other places in the codebase where the NEXT_PUBLIC_FRONTEND_URL environment variable is used, apart from the ContentSecurityPolicy object, I wasn't able to find any within the repository. However, it's possible that there may be other uses that I might have missed. If you encounter any issues or need further assistance, please provide more details so I can assist you better.

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

Hey my friend you could follow and adapt -> https://docs.quivr.app/deployment/digital_ocean