Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Offical apps | Community apps | Demo | Docs | Install
  1. Cloudron Forum
  2. GitHub Pages
  3. How to set export CORS_ENABLED="true" export CORS_ORIGIN="https://github.io"

How to set export CORS_ENABLED="true" export CORS_ORIGIN="https://github.io"

Scheduled Pinned Locked Moved GitHub Pages
2 Posts 2 Posters 69 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • scookeS Offline
    scookeS Offline
    scooke
    wrote last edited by scooke
    #1

    SO, I'm using this to host a nostr nip5 profile in a /public/.well-known/nostr.json file. When I check it with https://cors-test.codehappy.dev/ to see if CORS setup is right, it fails and won't work with CORS.

    SO, I have to set the access-control-allow-origin header set to *. How do I do that in this app?? I need to edit an nginx config file or something. So to make the weird title make sense:

    export CORS_ENABLED="true" 
    export CORS_ORIGIN="*"
    

    A life lived in fear is a life half-lived

    1 Reply Last reply
    1
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote last edited by
      #2

      Not sure I fully understand the target setup you intend to have. But to enable CORS on the github pages app is only really useful if some code running in another domain would call the REST API of the github pages app, which I am not sure it even has. But I might be misunderstanding here.

      If CORS is indeed needed, then the app coder (github pages) would need to support responding those pre-flight OPTIONS check queries by the browser.

      1 Reply Last reply
      1

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Bookmarks
      • Search