mirror of
https://github.com/Sudo-JHare/FHIRVINE-Smart-Proxy.git
synced 2025-06-16 13:10:02 +00:00
Compare commits
No commits in common. "main" and "V0.8-Beta" have entirely different histories.
6
app.py
6
app.py
@ -17,7 +17,6 @@ from sqlalchemy.exc import OperationalError
|
|||||||
from sqlalchemy import text
|
from sqlalchemy import text
|
||||||
from wtforms import StringField, URLField, SubmitField
|
from wtforms import StringField, URLField, SubmitField
|
||||||
from wtforms.validators import DataRequired, URL
|
from wtforms.validators import DataRequired, URL
|
||||||
from werkzeug.middleware.proxy_fix import ProxyFix
|
|
||||||
|
|
||||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
@ -34,7 +33,6 @@ migrate = Migrate()
|
|||||||
|
|
||||||
def create_app():
|
def create_app():
|
||||||
app = Flask(__name__, instance_relative_config=True)
|
app = Flask(__name__, instance_relative_config=True)
|
||||||
app.wsgi_app = ProxyFix(app.wsgi_app, x_proto=1, x_host=1, x_for=1)
|
|
||||||
app.config.from_mapping(
|
app.config.from_mapping(
|
||||||
SECRET_KEY=os.environ.get('SECRET_KEY', 'dev-secret-key-for-fhirvine'),
|
SECRET_KEY=os.environ.get('SECRET_KEY', 'dev-secret-key-for-fhirvine'),
|
||||||
SQLALCHEMY_DATABASE_URI=os.environ.get('DATABASE_URL', f'sqlite:///{os.path.join(app.instance_path, "fhirvine.db")}'),
|
SQLALCHEMY_DATABASE_URI=os.environ.get('DATABASE_URL', f'sqlite:///{os.path.join(app.instance_path, "fhirvine.db")}'),
|
||||||
@ -581,8 +579,6 @@ def create_app():
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
def custom_apidocs():
|
def custom_apidocs():
|
||||||
spec_url = url_for('flasgger.apispec_1', _external=True)
|
|
||||||
logger.debug(f"Swagger spec URL: {spec_url}")
|
|
||||||
return render_template('swagger-ui.html')
|
return render_template('swagger-ui.html')
|
||||||
|
|
||||||
@app.route('/about')
|
@app.route('/about')
|
||||||
@ -606,4 +602,4 @@ def create_app():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app = create_app()
|
app = create_app()
|
||||||
app.run(debug=True, port=5001)
|
app.run(debug=True, port=5001)
|
@ -15,11 +15,11 @@
|
|||||||
<li class="list-group-item"><strong>Token:</strong> <code>/oauth2/token</code></li>
|
<li class="list-group-item"><strong>Token:</strong> <code>/oauth2/token</code></li>
|
||||||
<li class="list-group-item"><strong>FHIR Proxy:</strong> <code>/oauth2/proxy/<path></code></li>
|
<li class="list-group-item"><strong>FHIR Proxy:</strong> <code>/oauth2/proxy/<path></code></li>
|
||||||
</ul>
|
</ul>
|
||||||
<p class="mt-3"><a href="http://fhirvine.sudo-fhir.au/api-docs" class="btn btn-primary">View API Documentation</a></p>
|
<p class="mt-3"><a href="/apidocs" class="btn btn-primary">View API Documentation</a></p>
|
||||||
<a href="{{ url_for('index') }}" class="btn btn-secondary">Back to Home</a>
|
<a href="{{ url_for('index') }}" class="btn btn-secondary">Back to Home</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
x
Reference in New Issue
Block a user