Results 1 to 3 of 3

Thread: can't make http get/post to other altervista site

  1. #1
    geomapper is offline Utente AlterBlog
    Join Date
    Jun 2021
    Posts
    2

    Default can't make http get/post to other altervista site

    I have two sites on altervista. One has php files and I want to do a get from the other altervista site, but I get the CORS error.
    Added Header add Access-Control-Allow-Origin 'https://geomapper.altervista.org' in the .htaccess file for the php one but it still doesn't work.
    Should I add geomapper.altervista.org to the whitelist site with the php files?
    Or is the cross site not allowed from one altervista site to another?

  2. #2
    alemoppo is offline AlterVista Staff
    Join Date
    Feb 2010
    Location
    IT
    Posts
    734

    Default

    Quote Originally Posted by geomapper View Post
    Should I add geomapper.altervista.org to the whitelist site with the php files?
    No, becasue the whitelist is related on the server request, I guess you are making requests via javascript.

    You can manage the Access-Control-Allow-Origin from the "header" of PHP (is not supported via .htaccess). Did you used the header() function in PHP before any html output?

    Bye!

  3. #3
    geomapper is offline Utente AlterBlog
    Join Date
    Jun 2021
    Posts
    2

    Default

    Thank you - that was very helpful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO