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

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

Open
wangshuai-wuhan opened this issue Mar 28, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@wangshuai-wuhan
Copy link

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

@wangshuai-wuhan wangshuai-wuhan added the enhancement New feature or request label Mar 28, 2024
Copy link

dosubot bot commented Mar 28, 2024

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.

@StanGirard
Copy link
Collaborator

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

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

No branches or pull requests

2 participants