Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7073751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:58:02+00:00 2026-05-28T05:58:02+00:00

I made the simple hello world NODEJS Server. I have a enyo web service

  • 0

I made the simple hello world NODEJS Server.
I have a enyo web service running in chrome that is trying to access the NODEJS server at http://localhost:3000

When is calls the onSuccess method, no data is loaded and the consule shows the following error

XMLHttpRequest cannot load http://localhost:3000/. Origin http://localhost:81 is not allowed by Access-Control-Allow-Origin.

I tested the nodejs server in the browser, it worked fine.

I tried to set the --disable-web-security, flag in chrome, it did not work.

Does anybody know how to fix this problem? If NOD.js is running on another server, would it work? This security is so confusing.
Ted

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:58:03+00:00Added an answer on May 28, 2026 at 5:58 am

    For security reasons, browsers limit the requests that a script may make via XMLHttpRequest.

    Your requests will only succeed under the following 2 cases:

    1. The origin of the URI that your script loads is the same as the origin of the page on which the script is executing (localhost:81 and localhost:3000 are the same host but different origins);
    2. or, if your browser supports it, the server of the page being requested includes an Access-Control-Allow-Origin header which explicitly authorizes pages served from the origin in question (or pages served from all origins) to make XMLHttpRequests to it.

    Try adding the Accesss-Control-Allow-Origin header to whatever is generating the response in your node code, adding a header in some code that looks like this:

    response.writeHead(200, {
                             'Content-Type': 'text/plain',
                             'Access-Control-Allow-Origin' : 'http://localhost:81'
    
                             //allow anything by replacing the above with
                             //'Access-Control-Allow-Origin' : '*'
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm trying to develop a simple Hello World web service using Axis2 v1.5, Tomcat6
I have a asmx web service running on a test server that has anonymous
I have made up a simple set of web services (trying to make a
i am new to servlets. I made a simple hello world programme that prints
I just installed Ubuntu 8.04 and Eclipse. I made a very simple Hello World
I'm working on a simple hello world TCP/IP client server app in C# and
I want to compile servlets outside of NetBeans. I made a simple Hello World
I'm trying to make a simple hello-world executable python gui app in windows using
We made a simple application and using GoogleAppEngineLauncher (GAEL) ran that locally. Then we
I've made a simple http server using Twisted, which sends the Content-Type: multipart/x-mixed-replace header.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.