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

Unable to view images on Hijiribe/Sonohara when Danbooru domain is blocked #3603

Closed
BrokenEagle opened this issue Apr 5, 2018 · 2 comments
Closed

Comments

@BrokenEagle
Copy link
Collaborator

From the Danbooru forum:

OniTea said:

Looks like after this fix thumbnails and images are forced to be from https://danbooru.donmai.us/ even if I'm currently on hijiribe\sonohara.
Is it possibly to revert this, since danbooru.donmai.us is blocked in my country, while hijiribe\sonohara not. (So I can enter the site now, but can't see any image at all).
VPN is always a way, but I'm trying to use it as less as possibly.

Apox said:

I second this, I would be really happy if you guys have solved this problem ASAP as well. Thanks.

@evazion
Copy link
Member

evazion commented Apr 5, 2018

Related to #3599.

@evazion
Copy link
Member

evazion commented Apr 6, 2018

We want to be able to set this base url something like this:

StorageManager::SFTP.new(host, base_url: "#{request.protocol}://#{request.host}/data")
StorageManager::SFTP.new(host, base_url: "#{root_url}/data") # alternatively

So that the base url uses the host and protocol from the current request. That way if you're on https://sonohara.donmai.us, the base url will be https://sonohara.donmai.us. Problem is we can't access the request object outside of controllers/views, unless we put it in a global somewhere.

r888888888 added a commit that referenced this issue Apr 9, 2018
Fix #3603: Unable to view images on Hijiribe/Sonohara when Danbooru is blocked
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

No branches or pull requests

2 participants