Open Closed

Cors #1331


User avatar
0
serdar.genc@talentra.net created

I'm testing a case with semantic-ui. I'm getting a but cors error. What should I do in which project for this? Do I have to do anything in the "**. web" project?

  • ABP Framework version: v4.3.0
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

It works fine on a standard core project. :

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

5 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share the http request details?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    serdar.genc@talentra.net created

    hi

    Can you share the http request details?

    Hi, remote connect ?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    Join the metting https://zoom.us/j/96714742145?pwd=NjZjbUhkaVZjcFphVmtuWUFiVThDdz09

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    try:

    abp.ajax.ajaxSendHandler = function (event, request, settings) {
        if (!isLocal(settings.url))
        {
            return;
        }
    
       var token = abp.security.antiForgery.getToken();
       if (!token) {
           return;
       }
    
       if (!settings.headers || settings.headers[abp.security.antiForgery.tokenHeaderName] === undefined) {
           request.setRequestHeader(abp.security.antiForgery.tokenHeaderName, token);
       }
    }
    
    function isLocal(url){
        return url.indexOf(location.host)>=0;
    }
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    serdar.genc@talentra.net created

    It was solved when I added it. OK. So is this the offical solution?

    I mean, Cors issue in abp is solved in this way?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 07:12
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.