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

Add redirect support (limit: 6) #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

da2x
Copy link
Contributor

@da2x da2x commented Mar 25, 2020

Resolves issue #25.

Copy link
Collaborator

@RangerMauve RangerMauve left a comment

Choose a reason for hiding this comment

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

This LGTM, I don't think I have publish rights though. 😀

@pfrazee
Copy link
Contributor

pfrazee commented Mar 27, 2020

@RangerMauve Why don't I add you to the npm package owners?

@RangerMauve
Copy link
Collaborator

@pfrazee That'd be swell. 💜

@RangerMauve
Copy link
Collaborator

Could be useful to be added as a collaborator on the repo too. 😁

@pfrazee
Copy link
Contributor

pfrazee commented Mar 27, 2020

Sure thing! What's your npm username?

@RangerMauve
Copy link
Collaborator

Also rangermauve 😁

@pfrazee
Copy link
Contributor

pfrazee commented Mar 28, 2020

Done!

@da2x
Copy link
Contributor Author

da2x commented Mar 28, 2020

The test relies on @staltz not changing his website. He hasn't done so in months even after the problem was identified in #25, so I hope it will work for some time.

Ideally, all these tests should be hosted on a project controlled domain. Come to think of it, does any of you have access to set up a redirect from the old datproject.org/.well-known/dat to dat.foundation/.well-known/dat? That could serve as the test case.

@RangerMauve
Copy link
Collaborator

RangerMauve commented Mar 28, 2020

I've got access to our netlify and DNS stuff and could set that up. I think datproject.org and dat.foundation are both hosted from the same server so they'd have the same .well-known folder.

I can set up another domain which does the redirect if you'd like. Same with DNS redirects.

What should it contain?

Something like redirect1.dat.foundation => .well-known redirect to dat.foundation and redirect2.dat.foundation => DNS redirect to dat.foundation?

@da2x
Copy link
Contributor Author

da2x commented Mar 29, 2020

@RangerMauve https://datproject.org/.well-known/dat currently redirects to https://dat.foundation/. Fix that redirect to point to the existing https://dat.foundation/.well-known/dat, and we can use https://datproject.org/.well-known/dat for the test. (Assuming those domains and redirects are expected to remain operational for a few years.)

@staltz
Copy link

staltz commented Mar 30, 2020

Interesting, a test case relying on my laziness to update my website! :)

Granted, I think netlify (my host) will change how redirects work. See this email I got:

We’ve recently fixed a bug in Netlify’s redirect handling, and we’ve identified one or more redirect rules on staltz.com that will begin to behave differently after the bug fix is applied on April 7th.

For more information on the nature of the bug and how it affects redirect rules, please visit the Community topic on our fix for forced redirects and shadowing behavior.

The redirect rules listed below are currently behaving as forced redirects (redirecting past existing content), even though you haven’t explicitly configured them to do so. You may want to check each redirect to be sure you want to continue this behavior, and if so, explicitly mark the rule as forced. In a _redirects file, you can do this by adding ! to the redirect status code. In a netlify.toml file, add the key and value force=true.

The following redirect rules might be affected by this change:

/.well-known/dat ... /dat 301 ...
/xstream ... http://staltz.github.io/xstream/ 301 ...

da2x added a commit to da2x/dat-fox that referenced this pull request Mar 31, 2020
@RangerMauve
Copy link
Collaborator

Err, I don't think I'll have time for setting up the domains after all, but I can still merge this in if it's looking good to you @da2x. I've just got way too much on my plate right now. 😅

MarkMacKaywa added a commit to MarkMacKaywa/dat-fox that referenced this pull request Jan 31, 2024
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.

4 participants