question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Access to API fails because of CORS on Tunnel-Reminder page

See original GitHub issue

Hi everyone, I set my API using localtunnel. It works fine and my server already allows cross domain requests, however, the TunnelReminder page does not allow cross domain requests and that makes it impossible to do any request to the server because it won’t even read the “Bypass-Tunnel-Reminder” header.

I’m using this bit of JS,

$.ajax({
    url: localtunnel_url,
    type: 'POST',
    headers: {'Bypass-Tunnel-Reminder': 'true'},
    data: form
})

which works fine if I execute it in a console inside my localtunnel domain, but if I’m outside it I get the No 'Access-Control-Allow-Origin' header is present on the requested resource.. Like I said, my server allows crossdomain requests, it’s the tunnel reminder page that does not.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

2reactions
felipeowencommented, Jun 9, 2021

I’m running into a similar issue. I can’t control the requests that are sent to the server. I need to be able to turn off the reminder page completely.

1reaction
Andres6936commented, Jul 19, 2021

Is there any way to avoid the problem without manual intervention?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem with CORS on nodejs · Issue #364 · localtunnel ...
I generated localtunnels for both, and the frontend makes API requests to the backend using the backend's localtunnel URL. I then access the ......
Read more >
3 Ways to Fix the CORS Error — and How the Access-Control ...
Fix one: install the Allow-Control-Allow-Origin plugin. The quickest fix you can make is to install the moesif CORS extension .
Read more >
CORS error from NextJS endpoint error even with "Access ...
Nevertheless, I keep getting a CORS error when I call the endpoint from my frontend. Access to XMLHttpRequest at 'http://localhost:3001/api/ ...
Read more >
Troubleshoot CORS errors from API Gateway - AWS
I get the error "No 'Access-Control-Allow-Origin' header is ... There are two ways to confirm the cause of a CORS error from API...
Read more >
What Is a CORS Error and How to Fix It (3 Ways) - Bannerbear
A CORS error is common when making an HTTP request to another origin. You can get rid of it using one of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found