Jump to content

Accessing Amazon S3 with CORS from SquareSpace

Recommended Posts

Hi guys,

I have a serious problem and I can't figure it out:

1. Nostr is a very fast growing decentralized social media platform.

2. Nostr uses a protocol called NIP-05 to "verify" a user using domain-level or other verification.

3. To verify, all one needs is a nostr.json file in the root domain located at /.well-known/nostr.json

4. One important detail: Because Nostr is decentralized, literally hundreds or thousands of clients need to be able to cross reference the file.  So CORS must be enabled.    SquareSpace currently does not directly support CORS.

5. I have a nostr.json file set as the index file on an S3 Amazon bucket with hosting turned on.  CORS has been enabled and is supported.

6. I am currently using a 301 redirect in URL mappings from SquareSpace to the target file.  /.well-known/nostr.json -> http://japaneur.s3-website.ap-northeast-3.amazonaws.com/nostr.json 301 BUT the problem is CORS will not work with redirects.

7. So I am trying to figure out how to enable SquareSpace, if it's possible, to point to the nostr.json file for the /.well-known/nostr.json URL in another way, other than a redirect.   Somehow using Amazon as the content delivery network for SquareSpace.

The way I can test if it is working is to see the green text in a Nostr client.  See attached jpegs.  When the NIP-05 works, the verified address will show green text.  When it doesn't work, nothing shows up.

I think I need a scripting genius to figure this out.


The alternative is to switch away from SquareSpace back to Wordpress, which we really don't want to do.

With CORS.png

Without CORS.png

Link to comment
  • Replies 0
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.