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: allow extension origins (still needs explicit listing), fixes #1686 #1797

Conversation

sublimator
Copy link
Contributor

No description provided.

@sublimator sublimator force-pushed the nd-allow-extension-origins-still-needs-explicit-listing-2024-01-05 branch from 448faad to e23f21b Compare January 5, 2024 02:05
@sublimator sublimator changed the title feat: allow extension origins (still needs explicit listing) fix: allow extension origins (still needs explicit listing), fixes #1686 Jan 5, 2024
@sublimator sublimator force-pushed the nd-allow-extension-origins-still-needs-explicit-listing-2024-01-05 branch from e23f21b to 8baaaa3 Compare January 5, 2024 02:06
Copy link
Contributor

@mxyng mxyng left a comment

Choose a reason for hiding this comment

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

looks good. thanks for creating this pr

@mxyng mxyng merged commit 0101e76 into ollama:main Jan 6, 2024
@sublimator
Copy link
Contributor Author

@mxyng

Thanks!

@wong2
Copy link

wong2 commented Jan 10, 2024

I believe this has been shipped in ollama v0.1.19, but I'm still getting 403 error when request from a browser extension (on macOS).

image image

@sublimator
Copy link
Contributor Author

sublimator commented Jan 10, 2024 via email

@wong2
Copy link

wong2 commented Jan 10, 2024

@sublimator Thanks, I see the problem. I thought AllowBrowserExtensions` means enable browser extension requests by default, I'm wrong.

@wong2
Copy link

wong2 commented Jan 10, 2024

I'm using macOS, do you know how can I restart the server with env var set?

@sublimator
Copy link
Contributor Author

sublimator commented Jan 10, 2024 via email

@sublimator
Copy link
Contributor Author

sublimator commented Jan 10, 2024 via email

@wong2
Copy link

wong2 commented Jan 10, 2024

Thanks!

@sublimator
Copy link
Contributor Author

sublimator commented Jan 13, 2024 via email

@sublimator
Copy link
Contributor Author

@wong2

Seems you can make a file like:

~/Library/LaunchAgents/ai.ollama.origins.plist 

with contents similar to:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>ai.ollama.origins</string>
    <key>ProgramArguments</key>
    <array>
        <string>/bin/launchctl</string>
        <string>setenv</string>
        <string>OLLAMA_ORIGINS</string>
        <string>chrome-
extension://dofdpnoclkigpakdndmhigfojjecnfln</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
</dict>
</plist>

@wong2
Copy link

wong2 commented Jan 23, 2024

@sublimator Thanks!

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