Skip to content

configure for https #345

Open
Open
@kaiyangli777

Description

@kaiyangli777

Hi there,

I am currently try to host cors-anywhere on my own server. I've done test with http://localhost:3030/url-of-the-actual-api, and it worked fine. I am now trying to use https://localhost:3030/url-of-the-actual-api, I've followed the instructions provided in issue#74, added the code below:
cors_anywhere = createServer({
httpsOptions: {
key: fs.readFileSync(path-to-the-key),
cert: fs.readFileSync(path-to-the-cert),
},
});

And I've also configured my apache config file and added a subdomain for port 3030, (xxx.mydomain.com) and it brings me to the page that shows "This API enables cross-origin requests to anywhere..." . However, when I make the cors API call with the subdomain with https (https://xxx.mydomain.com/url-of-the-actual-api), it responded with code 200 and the content of the "This API enables cross-origin requests to anywhere..." page, instead of the response content of the actual API call...

I'm doing something wrong? Could you give me some advice? Thank you in advance...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions