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

Added Password files and optimzed #4

Closed
wants to merge 0 commits into from
Closed

Added Password files and optimzed #4

wants to merge 0 commits into from

Conversation

miguelgargallo
Copy link
Contributor

@miguelgargallo miguelgargallo commented Apr 30, 2023

Description

I added the Password files and removed the parts that are unnecessary according the new Anse version

Linked Issues

#5 Password implementation

Additional context

I just added the files and optimized, this project is awesome and I invest my time to improve it!

@netlify
Copy link

netlify bot commented Apr 30, 2023

Deploy Preview for chatgpt-demo-v2 ready!

Name Link
🔨 Latest commit 4eefad3
🔍 Latest deploy log https://app.netlify.com/sites/chatgpt-demo-v2/deploys/646e58418135850007c89e03
😎 Deploy Preview https://deploy-preview-4--chatgpt-demo-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@ddiu8081
Copy link
Member

ddiu8081 commented May 2, 2023

I'm glad you're contributing to this feature, however it's not perfect yet.

For one thing, it lacks api-level authentication - Anse does not use api/generate route, which means that in Anse, there's no verification when sending a prompt, and users can easily bypass the password authentication page by blocking the request from the index page.

Also, I don't think it works in Docker environments. chatgpt-demo has been a problem in Docker, it doesn't read environment variables very well. I don't plan to use environment variables until that's fixed.

Still, thanks for the commit, and you can go ahead and finish your requirements in the fork version!

import Layout from '../layouts/Layout.astro'
---

<Layout title="Password Protection">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Protect

})
const responseJson = await response.json()
if (responseJson.code !== 0)
window.location.href = '/password'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Protect

<main class="h-screen col-fcc">
<div class="op-30">Please input password</div>
<div id="input_container" class="flex mt-4">
<input id="password_input" type="password" class="gpt-password-input" />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Protect

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.

None yet

3 participants