title: My Flask server on Pythonanywhere.com not works at my Ionic app
body: <p>I have a problem, when giv my Falsk py to cloud serve phytonanywhere.com works at Hi, I have a problem, when I giv my Falsk py to cloud serve phytonanywhere.com works at Chrome, but not works at app.</p>
  <p>This is my flask_app.py</p>
  <pre><code>from flask import Flask, jsonify,request
  from posts import posts
  
  
  app=Flask(__name__)
  
  @app.route('/')
  def index():
      lang = request.headers.get(&quot;Accept-Language&quot;, 'sk')[:2]
  
      p = list(map (lambda post: translate(post, lang), posts))
  
      return jsonify(p)
  
  
  def translate(post, lang):
      translation = next (t for t in post['translations'] if t['locale'] == lang)
  
      return {
          &quot;id&quot;: post ['id'],
          &quot;title&quot;: translation ['title'],
          &quot;description&quot;: translation ['description'],
          &quot;image&quot;: post['image'],
  }
  </code></pre>
  <p>Works at Chrome, I see this.</p>
  <p><a href="https://i.stack.imgur.com/M1kET.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>And my app code is</p>
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { HttpClient, HttpHeaders } from '@angular/common/http';
  
  
  @Component({
    selector: 'app-posts2',
    templateUrl: './posts.component.html',
    styleUrls: ['./posts.component.scss'],
  })
  export class PostsComponent implements OnInit {
    
    posts:any = [];
    constructor(private http: HttpClient) { }
  
   
  
    ngOnInit() {
      
  
      const lang = localStorage.getItem('lang') || 'sk';
      
      const headers = new HttpHeaders({
        'Accept-Language': lang
      })   
    
    
      this.http.get('http://miki83.pythonanywhere.com/', {
        headers: headers
      }).subscribe(data=&gt;{
        console.log();
        this.posts = data;
         });
    }
  
  }
  </code></pre>
  <p>How is problem? I paste the cloud Url to app.</p>