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
  • 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

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Ghost
  3. CORS in Ghost env?

CORS in Ghost env?

Scheduled Pinned Locked Moved Solved Ghost
4 Posts 3 Posters 176 Views 3 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.
  • samukS Offline
    samukS Offline
    samuk
    wrote on last edited by
    #1

    I'd like to use this Translation widget. https://github.com/OmDongaonkar03/Translation-Widget

    As we can't run PHP in our Ghost container It's set up here: https://transitionnetwork.org/remote-widgets/translate.php

    However when the widget is loaded on my Cloudron hosted Ghost: https://news.transitionnetwork.org/ (blue widget behind the temporary Gtranslate one)

    It doesn't work. We suspect a CORS issue, I see that in other apps you can add CORS to the ENV variable. Is that something that would work for Ghost?

    If it would what would be the correct syntax please?

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

      So looking at the webinspector while trying to use the translation widget, it reveals that the CORS preflight check (OPTIONS https://transitionnetwork.org/remote-widgets/translate.php) does not succeed. This means you have to allow CORS (and thus responding to the OPTIONS call) in your php application.

      1 Reply Last reply
      3
      • samukS Offline
        samukS Offline
        samuk
        wrote on last edited by
        #3

        Thanks, it works now. Slooow, but working.

        scookeS 1 Reply Last reply
        1
        • samukS samuk

          Thanks, it works now. Slooow, but working.

          scookeS Offline
          scookeS Offline
          scooke
          wrote on last edited by
          #4

          @samuk Please always try to show, or explain, what the solution was. This helps anyone else with the same or similar issue.

          A life lived in fear is a life half-lived

          1 Reply Last reply
          2
          • nebulonN nebulon marked this topic as a question on
          • nebulonN nebulon has marked this topic as solved on
          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