aquivo . conf do Swagger error:Ismatched Ccharacter expecting Eclipse

Asked

Viewed 12 times

0

My Eclipse shows me that the Cors.conf and Nginx.conf files are in error. When analyzing it points out the following problems. In Cors.conf:

    add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
#
# Custom headers and headers various browsers *should* be OK with but aren't
#
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type' always;
#
# Tell client that this pre-flight info is valid for 20 days
#
add_header 'Access-Control-Max-Age' $access_control_max_age always; // ERRO --> mismatched character 'a' expecting '{'

if ($request_method = OPTIONS) { // ERRO --> mismatched character 'r' expecting '{' e tbm no viable alternative at input '=' 

  return 204; 
}

screenshot eclipse

The application works normally but I do not know how to get these mistakes. I think it must be some Eclipse configuration because it happened after an update and I didn’t change these files.

  • 1

    this file extension must is associated some programming language... something similar has happened to me in the sublime... the solution is to associate the correct language/disassociate this language extension that the eclipse assigned to it.

1 answer

0


As suggested in the comments, the problem is Eclipse configuration. Changing the file associations the error warnings disappear. That way Windows -> Preferences -> General -> Editor -> File assocations

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.