Certain endpoints are not hit and return 404 error while app running on the server but works on localhost

My web app is developed in Angular and backend is developed in .Net Core.
After deploying it in docker on the server, I can visit most of the pages but certain endpoints return 404 not found error. These work fine on localhost.

Backend:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>[Authorize(Policy = "IsDesigner")]
[Route("api/[controller]")]
[ApiController]
public class DesignerController : ControllerBase
{
...
[HttpGet("{project}/{loop}")]
public async Task<IActionResult> GetChecklistByLoopAsync(string project, int loop,
CancellationToken cancellationToken)
{
...
}
}
</code>
<code>[Authorize(Policy = "IsDesigner")] [Route("api/[controller]")] [ApiController] public class DesignerController : ControllerBase { ... [HttpGet("{project}/{loop}")] public async Task<IActionResult> GetChecklistByLoopAsync(string project, int loop, CancellationToken cancellationToken) { ... } } </code>
[Authorize(Policy = "IsDesigner")]
[Route("api/[controller]")]
[ApiController]
public class DesignerController : ControllerBase
{
    ...

    [HttpGet("{project}/{loop}")]
    public async Task<IActionResult> GetChecklistByLoopAsync(string project, int loop, 
    CancellationToken cancellationToken)
    {
        ...
    }
}

Frontend:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>getTaskByProject(role:string,project:string):Observable<any> {
const encodedProject = encodeURIComponent(project);
let requiredurl: string;
requiredurl = `${this.apiUrl}/${role}/selection/${encodedProject}`;
const headers = { 'content-type': 'application/json','Authorization':`Bearer ${this.getToken()}`}
return this.http.get(requiredurl, {'headers':headers, observe:'response'});
}
</code>
<code>getTaskByProject(role:string,project:string):Observable<any> { const encodedProject = encodeURIComponent(project); let requiredurl: string; requiredurl = `${this.apiUrl}/${role}/selection/${encodedProject}`; const headers = { 'content-type': 'application/json','Authorization':`Bearer ${this.getToken()}`} return this.http.get(requiredurl, {'headers':headers, observe:'response'}); } </code>
getTaskByProject(role:string,project:string):Observable<any> {
    const encodedProject = encodeURIComponent(project);
    let requiredurl: string; 
    requiredurl = `${this.apiUrl}/${role}/selection/${encodedProject}`;
    const headers = { 'content-type': 'application/json','Authorization':`Bearer ${this.getToken()}`}
    return this.http.get(requiredurl, {'headers':headers, observe:'response'});
  }

Error message:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>polyfills.4cb30b968c6ea108.js:1
GET https://azeu1.pp.com:4200/api/Designer/selection/AA%20BB%20CC%2FDD%20EE 404 (Not Found)
main.11182255502544c4.js:1
ERROR
wr {headers: lo, status: 404, statusText: 'Not Found', url: 'https://azeu1.pp.com:4200/api/Designer/selection/AA%20BB%20CC%2FDD%20EE', ok: false, …}
error
:
null
headers
:
lo
lazyInit
:
()=> {}
lazyUpdate
:
null
normalizedNames
:
Map(0) {size: 0}
[[Prototype]]
:
Object
message
:
"Http failure response for https://azeu1.pp.com:4200/api/Designer/selection/AA%20BB%20CC%2FDD%20EE: 404 Not Found"
name
:
"HttpErrorResponse"
ok
:
false
status
:
404
statusText
:
"Not Found"
url
:
"https://azeu1.pp.com:4200/api/Designer/selection/AA%20BB%20CC%2FDD%20EE"
[[Prototype]]
:
_S
</code>
<code>polyfills.4cb30b968c6ea108.js:1 GET https://azeu1.pp.com:4200/api/Designer/selection/AA%20BB%20CC%2FDD%20EE 404 (Not Found) main.11182255502544c4.js:1 ERROR wr {headers: lo, status: 404, statusText: 'Not Found', url: 'https://azeu1.pp.com:4200/api/Designer/selection/AA%20BB%20CC%2FDD%20EE', ok: false, …} error : null headers : lo lazyInit : ()=> {…} lazyUpdate : null normalizedNames : Map(0) {size: 0} [[Prototype]] : Object message : "Http failure response for https://azeu1.pp.com:4200/api/Designer/selection/AA%20BB%20CC%2FDD%20EE: 404 Not Found" name : "HttpErrorResponse" ok : false status : 404 statusText : "Not Found" url : "https://azeu1.pp.com:4200/api/Designer/selection/AA%20BB%20CC%2FDD%20EE" [[Prototype]] : _S </code>
polyfills.4cb30b968c6ea108.js:1 
 
 GET https://azeu1.pp.com:4200/api/Designer/selection/AA%20BB%20CC%2FDD%20EE 404 (Not Found)
main.11182255502544c4.js:1 
 ERROR 
wr {headers: lo, status: 404, statusText: 'Not Found', url: 'https://azeu1.pp.com:4200/api/Designer/selection/AA%20BB%20CC%2FDD%20EE', ok: false, …}
error
: 
null
headers
: 
lo
lazyInit
: 
()=> {…}
lazyUpdate
: 
null
normalizedNames
: 
Map(0) {size: 0}
[[Prototype]]
: 
Object
message
: 
"Http failure response for https://azeu1.pp.com:4200/api/Designer/selection/AA%20BB%20CC%2FDD%20EE: 404 Not Found"
name
: 
"HttpErrorResponse"
ok
: 
false
status
: 
404
statusText
: 
"Not Found"
url
: 
"https://azeu1.pp.com:4200/api/Designer/selection/AA%20BB%20CC%2FDD%20EE"
[[Prototype]]
: 
_S

The Nginx config is:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>worker_processes 1;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name azeu1.pp.com;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location /api/ {
proxy_pass http://pp_v3:5000/api/;
}
listen 443 ssl;
server_name azeu1.pp.com;
ssl_certificate /etc/nginx/certs/server.crt;
ssl_certificate_key /etc/nginx/certs/server.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
error_page 404 /404.html;
location = /404.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
}
</code>
<code>worker_processes 1; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 80; server_name azeu1.pp.com; location / { root /usr/share/nginx/html; index index.html index.htm; try_files $uri $uri/ /index.html; } location /api/ { proxy_pass http://pp_v3:5000/api/; } listen 443 ssl; server_name azeu1.pp.com; ssl_certificate /etc/nginx/certs/server.crt; ssl_certificate_key /etc/nginx/certs/server.key; ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers HIGH:!aNULL:!MD5; error_page 404 /404.html; location = /404.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { } } } </code>
worker_processes 1;

events {
    worker_connections 1024;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    keepalive_timeout  65;

    server {
        listen 80;
        server_name azeu1.pp.com;

        location / {
            root   /usr/share/nginx/html;
            index  index.html index.htm;
            try_files $uri $uri/ /index.html;
        }

        location /api/ {
            proxy_pass   http://pp_v3:5000/api/;
        }

        listen 443 ssl;
        server_name azeu1.pp.com;
        ssl_certificate /etc/nginx/certs/server.crt;
        ssl_certificate_key /etc/nginx/certs/server.key;
        ssl_protocols TLSv1.2 TLSv1.3;
        ssl_ciphers HIGH:!aNULL:!MD5;

        error_page 404 /404.html;
        location = /404.html {
        }

        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
        }
    }
}

But for the same endpoint running locally http://localhost:4200/api/Designer/selection/AA%20BB%20CC%2FDD%20EE, it works. And most of the features in the app work on the server, just this certain one does not.

Could someone tell me what is the potential cause?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật