/// <summary> /// Initializes a new instance of the <see cref="T:iTin.Export.Model.CurrencyDataTypeModel" /> class. /// </summary> public CurrencyDataTypeModel() { _locale = DefaultLocale; }
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { var supportedCultures = KnownCulture.SupportedCultures().ToList(); app.UseRequestLocalization(new RequestLocalizationOptions { SupportedCultures = supportedCultures, SupportedUICultures = supportedCultures, FallBackToParentCultures = true, FallBackToParentUICultures = true, }); var forwardOptions = new ForwardedHeadersOptions { ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto, RequireHeaderSymmetry = false }; forwardOptions.KnownNetworks.Clear(); forwardOptions.KnownProxies.Clear(); app.UseForwardedHeaders(forwardOptions); app.UsePathBase("/api"); if (env.IsDevelopment()) { app.UseForwardedHeaders(); app.UseSwagger(options => { options.RouteTemplate = "swagger/{documentName}/swagger.json"; options.SerializeAsV2 = true; }); app.UseSwaggerUI(options => options.SwaggerEndpoint("/swagger/v1/swagger.json", "raBudgetApi")); app.UseCors(builder => builder.WithOrigins("https://localhost:8080") .AllowAnyHeader() .AllowAnyMethod() .AllowCredentials()); } else { app.UseCors(builder => builder.WithOrigins("https://budget.rabt.pl") .AllowAnyHeader() .AllowAnyMethod() .AllowCredentials()); app.UseForwardedHeaders(); app.UseHsts(); } app.UseExceptionHandler("/error"); app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseRouting(); app.UseIdentityServices(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapHub <BalanceNotificationsHub>("hubs/balance-notifications"); endpoints.MapHub <TransactionNotificationsHub>("hubs/transaction-notifications"); }); }
/// <summary> /// Initializes a new instance of the <see cref="T:iTin.Export.Model.CurrencyDataTypeModel" /> class. /// </summary> public CurrencyDataTypeModel() { _locale = LocaleDefault; }
/// <summary> /// Initializes a new instance of the <see cref="T:iTin.Export.Model.BaseConditionModel" /> class. /// </summary> protected BaseConditionModel() { _active = ActiveDefault; _locale = LocaleDefault; _entrireRow = EntireRowDefault; }