Git Product home page Git Product logo

Comments (22)

MattIPv4 avatar MattIPv4 commented on June 10, 2024

It should work, though I don't think we have anyone currently doing it. If it doesn't for any reason, I can contact folks at Cloudflare to figure out making it work hopefully.

from js.org.

shoaib-jamal avatar shoaib-jamal commented on June 10, 2024

And what about workers?
https://workers.cloudflare.com/

from js.org.

MattIPv4 avatar MattIPv4 commented on June 10, 2024

You cannot CNAME to Workers, as far as I know.

from js.org.

shoaib-jamal avatar shoaib-jamal commented on June 10, 2024

Okay, thankyou.

from js.org.

shoaib-jamal avatar shoaib-jamal commented on June 10, 2024

Hey, is it possible to add Cloudflare's free Compression/Cache to a js.org subdomain?
I am deploying on Netlify and experiencing high bandwidth usage - Since js.org uses cloudflare at back is it possible that caching and compression to be enabled there for rebornxp.js.org subdomain?

from js.org.

MattIPv4 avatar MattIPv4 commented on June 10, 2024

All js.org subdomains go through Cloudflare's proxy by default and use their standard caching settings. You can request the proxy is disabled if you wish by adding // noCF to the entry in cnames_active.js. We cannot customise the cache rules etc. on a per-subdomain basis.

from js.org.

shoaib-jamal avatar shoaib-jamal commented on June 10, 2024

I don't want to disable the proxy but I wanted to enable compression type something.

from js.org.

MattIPv4 avatar MattIPv4 commented on June 10, 2024

Pretty sure Cloudflare does compression on the fly where it can.

curl -s -H "Accept-Encoding: gzip" https://status.js.org | gzip -d

<html lang="en">
<head>
    <title>HTTP Status Codes</title>
...

from js.org.

shoaib-jamal avatar shoaib-jamal commented on June 10, 2024

So isn't there any way to reduce bandwith load on my netlify deployment?

from js.org.

MattIPv4 avatar MattIPv4 commented on June 10, 2024

Not beyond what is already being provided. I'd recommend looking at getting your own domain if you need to tune caching etc. more.

from js.org.

shoaib-jamal avatar shoaib-jamal commented on June 10, 2024

Hello, sorry again but now I have compiled the SSR to a static html and I'm now planning to again host on gh-pages since now it's static html. The problem with gh-pages is about the relative paths, the repo is being excluded for ex. "/css/" is being treated as https://user.github.io/css instead of https://user.github.io/repo/css

I was asking it since if I deploy it on js.org subdomain, will this problem occur? Like CNAME points to that same gh-pages domain.

from js.org.

indus avatar indus commented on June 10, 2024

@shoaib-jamal If you use CNAME on your user-repo (the repo has to be named .github.io) other repositories of your user will be accessible via path if you use project repo they won't. But why not just try out but all this back and forth.

@MattIPv4 Regarding CF workers: I think it does work to add CNAMEs for them. I've added one for JS.ORG like someworker.jsorg.workers.dev and it does work. I don't see why it shouldn't work for other/external workers.

from js.org.

MattIPv4 avatar MattIPv4 commented on June 10, 2024

Oh interesting, I was not aware you could CNAME to a worker, I thought you had to register the route with the worker, and to do that you needed to control the zone in Cloudflare.

from js.org.

shoaib-jamal avatar shoaib-jamal commented on June 10, 2024

@indus Ahh thankyou, let me just try it, and also please confirm about the cloudflare pages (not workers) that if they support js.org sub. I tried aading it and it asked for NS verification.

from js.org.

shoaib-jamal avatar shoaib-jamal commented on June 10, 2024

I've opened the PR please merge it & if the relative path issue persists I'll consider moving to cloudflare pages, can you also confirm if it can be done with CNAME without NS

from js.org.

indus avatar indus commented on June 10, 2024

@shoaib-jamal I only have the CF account for JS.ORG and it may differ to an external account. If you are forced to make a verification with a NS record it won't work. If a TXT record is enough it should work.

from js.org.

indus avatar indus commented on June 10, 2024

What is the problem with fixing the relative paths. Why has the host match the paths you have set up and not make the paths match to the hosting you have? Sorry if I'm I missed something but I really don't get it...

from js.org.

shoaib-jamal avatar shoaib-jamal commented on June 10, 2024

Hey, sorry for confusion, I'm experiencing this problem: https://maximorlov.com/deploying-to-github-pages-dont-forget-to-fix-your-links/

My project is based on SvelteKit and it builds the static html in a way that the content is served from root domain. But gh-pages the root path isn't there, instead it ends with a dir of repo name. Thats why it can't fetch assets and returns with 404.

@indus Looks like you have merged the CNAME gh-pages because the subdomain is serving from gh pages instead of netlify, but in cnames-active.js I still see the netlify CNAME.

Finally I've come to conclusion that I'll host it on my friend's VPS, on his subdomain, I was asking if it's possible to CNAME that subdomain to js.org. If yes, I am creating a PR, please merge it.

from js.org.

shoaib-jamal avatar shoaib-jamal commented on June 10, 2024

I found on a website: Using a CNAME record for a subdomain that already has an A record might not work reliably due to DNS specifications. While some DNS providers may allow this configuration, it's generally not recommended and might lead to unexpected behavior or DNS resolution issues. Therefore, it's advisable to directly use an A record pointing to the IP address instead of relying on a CNAME record in this scenario.

So the question is will it work? I have opened a new PR, If you're sure it will work please merge it otherwise fallback to the netlify one (rebornxp.netlify.app), it is configured for working with js.org, I'll move to a paid plan there, and please do it ASAP since my visitors are questioning about it - don't wait for my confirmation.

@indus @MattIPv4 Again, sorry for too much confusion and issues.

from js.org.

MattIPv4 avatar MattIPv4 commented on June 10, 2024

CNAME records are very standard, I'm not aware of any DNS provider that does not support/resolve then.

from js.org.

shoaib-jamal avatar shoaib-jamal commented on June 10, 2024

@indus I think its not possible to CNAME an A Record. Please fallback to netlify.

from js.org.

MattIPv4 avatar MattIPv4 commented on June 10, 2024

That's not how DNS works, the entire purpose of a CNAME is to alias one subdomain to another that already has an A record, but sure, you're welcome to switch back to Netlify. I'm going to close this issue now, as we're really not getting anywhere.

from js.org.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.