Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json format error #3

Open
millievn opened this issue Jul 21, 2023 · 1 comment
Open

json format error #3

millievn opened this issue Jul 21, 2023 · 1 comment

Comments

@millievn
Copy link

I use webui by docker and get wrong code:

input:

    location /api/ro {
      default_type "application/json";
      return ' { "code":200 }'
}

output:

location /api/ro {
      default_type "application/json";
      return ' {
        #$#%#$#placeholder03434#$#%#$#:200
      }
      '
    }
@tamr
Copy link

tamr commented Jan 20, 2024

Same with cli, it doesn't play well with escaped quotes

add_header 'Content-Disposition' 'attachment;filename*="utf-8\'\'$filename"';
becomes
add_header 'Content-Disposition' 'attachment;filename*="utf-8''$filename"';

and

location = /robots.txt { return 200 "User-agent: *\nDisallow: /\n"; }
becomes

location = /robots.txt {
  return 200 #$#%#$#placeholder03434#$#%#$#;
}

Was looking for such useful tool, especially for bulk formatter, but it needs some polishing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants